MDL-13792: fixing problem in the previous patch, where filename contain spaces

This commit is contained in:
scyrma
2008-05-28 05:15:39 +00:00
parent bd454a0c43
commit c9e47cd096
+2 -2
View 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 = '&';
}