]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13792: fixing problem in the previous patch, where filename contain spaces (merge...
authorscyrma <scyrma>
Wed, 28 May 2008 05:17:13 +0000 (05:17 +0000)
committerscyrma <scyrma>
Wed, 28 May 2008 05:17:13 +0000 (05:17 +0000)
lib/filelib.php

index 9679939f8f66ddc5bc2693bcc71be4f9ef42c2af..b21c11594fa31aa86b41352bbd9bf372d5584b83 100644 (file)
@@ -16,12 +16,12 @@ function get_file_url($path, $options=null, $type='coursefile') {
 
     if ($CFG->slasharguments) {
         $parts = explode('/', $path);
-        $parts = array_map('urlencode', $parts);
+        $parts = array_map('rawurlencode', $parts);
         $path  = implode('/', $parts);
         $ffurl = "$CFG->wwwroot/file.php/$path";
         $separator = '?';
     } else {
-        $path = urlencode("/$path");
+        $path = rawurlencode("/$path");
         $ffurl = "$CFG->wwwroot/file.php?file=$path";
         $separator = '&amp;';
     }