Skip to content

Commit

Permalink
MDL-13792: fixing problem in the previous patch, where filename conta…
Browse files Browse the repository at this point in the history
…in spaces (merge from 1.9)
  • Loading branch information
scyrma committed May 28, 2008
1 parent 5423512 commit 5e19ea3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/filelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '&';
}
Expand Down

0 comments on commit 5e19ea3

Please sign in to comment.