Fixed a path problem that occurs while unzipping

This commit is contained in:
michaelpenne 2005-07-22 21:09:37 +00:00
parent c24aca42c5
commit 0bdb7db93f

View file

@ -129,7 +129,7 @@ function readdata($file, $courseid, $modname) {
move_uploaded_file($tempzipfile, $base.$zipfile);
// unzip it!
unzip_file($base.$zipfile, $base.$dirname, false);
unzip_file($base.$zipfile, $base, false);
$base = $base.$dirname; // update the base
@ -140,7 +140,6 @@ function readdata($file, $courseid, $modname) {
if (file_exists($outline) and is_readable($outline)) {
$outlinecontents = file_get_contents($outline);
$filenames = array();
preg_match_all("/javascript:GoToSld\('(.*)'\)/", $outlinecontents, $filenames); // this gets all of our files names