Permalink
Browse files

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

…16_STABLE
  • Loading branch information...
1 parent 42101fa commit b2fcca276120fcf35c5c3ab3d5a0ac81d83ab7f6 skodak committed May 18, 2006
Showing with 2 additions and 6 deletions.
  1. +2 −6 files/index.php
View
@@ -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\">";

0 comments on commit b2fcca2

Please sign in to comment.