MDL-54756 moodle_url: remove dangerous trim from make_file_url
authorTim Hunt <T.J.Hunt@open.ac.uk>
Fri, 27 May 2016 18:55:25 +0000 (19:55 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Fri, 27 May 2016 18:55:25 +0000 (19:55 +0100)
This was a regression caused by MDL-50268. It broke qtype_stack.

lib/weblib.php

index fe5b2c3..372620f 100644 (file)
@@ -760,7 +760,6 @@ class moodle_url {
         if ($forcedownload) {
             $params['forcedownload'] = 1;
         }
-        $path = rtrim($path, '/');
         $url = new moodle_url($urlbase, $params);
         $url->set_slashargument($path);
         return $url;