From: scyrma Date: Wed, 28 May 2008 05:17:13 +0000 (+0000) Subject: MDL-13792: fixing problem in the previous patch, where filename contain spaces (merge... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5e19ea3206fdee59f37d6547d396d4263ce3a431;p=moodle.git MDL-13792: fixing problem in the previous patch, where filename contain spaces (merge from 1.9) --- diff --git a/lib/filelib.php b/lib/filelib.php index 9679939f8f..b21c11594f 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -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 = '&'; }