From 0bdb7db93fc962e748dbab48bfedddca6134a724 Mon Sep 17 00:00:00 2001 From: michaelpenne Date: Fri, 22 Jul 2005 21:09:37 +0000 Subject: [PATCH] Fixed a path problem that occurs while unzipping --- mod/lesson/importppt.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mod/lesson/importppt.php b/mod/lesson/importppt.php index b803f4dd380..8620bfa9e7c 100644 --- a/mod/lesson/importppt.php +++ b/mod/lesson/importppt.php @@ -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,10 +140,9 @@ 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 - + // file $pages with the contents of all of the slides foreach ($filenames[1] as $file) { $path = $base.'/'.$file;