Index: index.php =================================================================== RCS file: /cvsroot/moodle/moodle/files/index.php,v retrieving revision 1.109 diff -u -r1.109 index.php --- index.php 8 Jan 2007 09:14:26 -0000 1.109 +++ index.php 18 Jan 2007 00:53:11 -0000 @@ -272,7 +272,7 @@ html_header($course, $wdir); if (isset($USER->fileop) and ($USER->fileop == "move") and confirm_sesskey()) { foreach ($USER->filelist as $file) { - $shortfile = basename($file); + $shortfile = preg_replace('/^.+[\\\\\\/]/', '', $file); $oldfile = $basedir.'/'.$file; $newfile = $basedir.$wdir."/".$shortfile; if (!rename($oldfile, $newfile)) { @@ -487,7 +487,7 @@ echo "
$strunpacking:
"; - $file = basename($file); + $file = preg_replace('/^.+[\\\\\\/]/', '', $file); if (!unzip_file("$basedir$wdir/$file")) { error(get_string("unzipfileserror","error")); @@ -517,7 +517,7 @@ $strlistfiles = get_string("listfiles", "", $file); echo "$strlistfiles:
"; - $file = basename($file); + $file = preg_replace('/^.+[\\\\\\/]/', '', $file); include_once("$CFG->libdir/pclzip/pclzip.lib.php"); $archive = new PclZip(cleardoubleslashes("$basedir$wdir/$file"));