Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed bug #5533, could not choose from file root; merged from MOODLE_…

…16_STABLE
  • Loading branch information...
commit b2fcca276120fcf35c5c3ab3d5a0ac81d83ab7f6 1 parent 42101fa
skodak authored
Showing with 2 additions and 6 deletions.
  1. +2 −6 files/index.php
View
8 files/index.php
@@ -757,16 +757,12 @@ function displaydir ($wdir) {
$count++;
$filename = $fullpath."/".$file;
- $fileurl = "$wdir/$file";
+ $fileurl = trim($wdir, "/")."/$file";
$filesafe = rawurlencode($file);
$fileurlsafe = rawurlencode($fileurl);
$filedate = userdate(filemtime($filename), "%d %b %Y, %I:%M %p");
- if (substr($fileurl,0,1) == '/') {
- $selectfile = substr($fileurl,1);
- } else {
- $selectfile = $fileurl;
- }
+ $selectfile = trim($fileurl, "/");
echo "<tr class=\"file\">";
Please sign in to comment.
Something went wrong with that request. Please try again.