]> git.mjollnir.org Git - moodle.git/commitdiff
Fix path problem with main directory listing
authormoodler <moodler>
Sun, 2 May 2004 15:25:46 +0000 (15:25 +0000)
committermoodler <moodler>
Sun, 2 May 2004 15:25:46 +0000 (15:25 +0000)
mod/resource/view.php

index c330f672c125a6ca451751b625b35f4bd3fe9055..7a5f276572b61c0456d6d01b1fd621efc68bb783 100644 (file)
                 $icon = mimeinfo("icon", $file);
 
                 if ($CFG->slasharguments) {
-                    $relativeurl = "/file.php/$course->id/$resource->reference/$file";
+                    $relativeurl = "/file.php/$relativepath/$file";
                 } else {
-                    $relativeurl = "/file.php?file=/$course->id/$resource->reference/$file";
+                    $relativeurl = "/file.php?file=/$relativepath/$file";
                 }
                 $filesize = display_size(filesize("$CFG->dataroot/$course->id/$resource->reference/$file"));