]> git.mjollnir.org Git - moodle.git/commitdiff
fixes reported quote issue on $file in shel exec commands (MDL14325)
authordiml <diml>
Fri, 11 Apr 2008 23:20:04 +0000 (23:20 +0000)
committerdiml <diml>
Fri, 11 Apr 2008 23:20:04 +0000 (23:20 +0000)
search/documents/physical_doc.php
search/documents/physical_pdf.php

index 3b5f1c07ec9c3f47124fd9157ea7d0e524d8c676..ca053bde51d6eb4c41353f90f64398e19401b91c 100644 (file)
@@ -34,7 +34,7 @@ function get_text_for_indexing_doc(&$resource){
         else{
             $file = escapeshellarg($CFG->dataroot.'/'.$resource->course.'/'.$resource->reference);
             $command = trim($CFG->block_search_word_to_text_cmd);
-            $text_converter_cmd = "{$moodleroot}{$command} \"$file\"";
+            $text_converter_cmd = "{$moodleroot}{$command} $file";
             if ($CFG->block_search_word_to_text_env){
                 putenv($CFG->block_search_word_to_text_env);
             }
index d3ad8cd71afa92c43092ef264462eff0b377658d..703f68bf1e07277122bb9308a0cacdfa27486655 100644 (file)
@@ -34,7 +34,7 @@ function get_text_for_indexing_pdf(&$resource){
         else{
             $file = escapeshellarg($CFG->dataroot.'/'.$resource->course.'/'.$resource->reference);
             $command = trim($CFG->block_search_pdf_to_text_cmd);
-            $text_converter_cmd = "{$moodleroot}{$command} \"$file\" -";
+            $text_converter_cmd = "{$moodleroot}{$command} $file -";
             $result = shell_exec($text_converter_cmd);
             if ($result){
                 return $result;