mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-14279: Fixes for regressions created by the get_file_url massive change (merge from 1.9)
This commit is contained in:
parent
ddeaf74d96
commit
b0374a1692
@ -813,7 +813,7 @@ function displaydir ($wdir) {
|
||||
print_cell("center", "<input type=\"checkbox\" name=\"file$count\" value=\"$fileurl\" />", 'checkbox');
|
||||
echo "<td align=\"left\" style=\"white-space:nowrap\" class=\"name\">";
|
||||
|
||||
$ffurl = str_replace('//', '/', get_file_url("$id/$fileurl"));
|
||||
$ffurl = get_file_url($id.'/'.$fileurl);
|
||||
link_to_popup_window ($ffurl, "display",
|
||||
"<img src=\"$CFG->pixpath/f/$icon\" class=\"icon\" alt=\"$strfile\" /> ".htmlspecialchars($file),
|
||||
480, 640);
|
||||
|
@ -755,7 +755,7 @@ function displaydir ($wdir) {
|
||||
print_cell("center", "<input type=\"checkbox\" name=\"file$count\" value=\"$fileurl\" onclick=\";return set_rename('$file');\" />");
|
||||
}
|
||||
echo "<td align=\"left\" nowrap=\"nowrap\">";
|
||||
$ffurl = get_file_url($id$fileurl);
|
||||
$ffurl = get_file_url($id.$fileurl);
|
||||
link_to_popup_window ($ffurl, "display",
|
||||
"<img src=\"$CFG->pixpath/f/$icon\" class=\"icon\" alt=\"$strfile\" />",
|
||||
480, 640);
|
||||
|
@ -5,6 +5,7 @@ define('BYTESERVING_BOUNDARY', 's1k2o3d4a5k6s7'); //unique string constant
|
||||
function get_file_url($path, $options=null, $type='coursefile') {
|
||||
global $CFG;
|
||||
|
||||
$path = str_replace('//', '/', $path);
|
||||
$path = trim($path, '/'); // no leading and trailing slashes
|
||||
|
||||
// type of file
|
||||
|
Loading…
x
Reference in New Issue
Block a user