Skip to content
Browse files

MDL-11342: Urlencode the filepath in directory resource

  • Loading branch information...
1 parent 02aad24 commit 9ebf1ff327c5fff34ebdb9869f4b40f70101ba2e scyrma committed
Showing with 3 additions and 8 deletions.
  1. +2 −7 mod/resource/type/directory/resource.class.php
  2. +1 −1 mod/resource/version.php
View
9 mod/resource/type/directory/resource.class.php
@@ -126,12 +126,7 @@ function display() {
} else {
$icon = mimeinfo("icon", $file);
-
- if ($CFG->slasharguments) {
- $relativeurl = "/file.php/$relativepath/$file";
- } else {
- $relativeurl = "/file.php?file=/$relativepath/$file";
- }
+ $relativeurl = get_file_url("$relativepath/$file");
$filesize = display_size(filesize("$CFG->dataroot/$relativepath/$file"));
}
@@ -198,4 +193,4 @@ function setup_elements(&$mform) {
}
-?>
+?>
View
2 mod/resource/version.php
@@ -6,7 +6,7 @@
////////////////////////////////////////////////////////////////////////////////
$module->version = 2007020200;
-$module->requires = 2007020200; // Requires this Moodle version
+$module->requires = 2007021550; // Requires this Moodle version
$module->cron = 0;
?>

0 comments on commit 9ebf1ff

Please sign in to comment.
Something went wrong with that request. Please try again.