Inaki Arenzana
This commit is contained in:
diml 2007-12-05 15:54:39 +00:00
parent bbebbc0c57
commit 26fc4193f5
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ function get_text_for_indexing_doc(&$resource){
mtrace('Error with MSWord to text converter command : exectuable not found.');
}
else{
$file = $CFG->dataroot.'/'.$resource->course.'/'.$resource->reference;
$file = escapeshellarg($CFG->dataroot.'/'.$resource->course.'/'.$resource->reference);
$text_converter_cmd = "{$CFG->dirroot}/{$CFG->block_search_word_to_text_cmd} $file";
if ($CFG->block_search_word_to_text_env){
putenv($CFG->block_search_word_to_text_env);

View File

@ -21,7 +21,7 @@ function get_text_for_indexing_pdf(&$resource){
mtrace('Error with pdf to text converter command : exectuable not found.');
}
else{
$file = $CFG->dataroot.'/'.$resource->course.'/'.$resource->reference;
$file = escapeshellarg($CFG->dataroot.'/'.$resource->course.'/'.$resource->reference);
$text_converter_cmd = "{$CFG->dirroot}/{$CFG->block_search_pdf_to_text_cmd} $file -";
$result = shell_exec($text_converter_cmd);
if ($result){