Full paths when including pclzip bug 1139

This commit is contained in:
moodler 2004-03-13 12:08:28 +00:00
parent bd83d0a3a8
commit 5151ae66e3

View File

@ -366,7 +366,7 @@
foreach ($USER->filelist as $file) {
$files[] = "$basedir/$file";
}
include_once('../lib/pclzip/pclzip.lib.php');
include_once("$CFG->libdir/pclzip/pclzip.lib.php");
$archive = new PclZip("$basedir/$wdir/$name");
if (($list = $archive->create($files,'',"$basedir/$wdir/")) == 0) {
error($archive->errorInfo(true));
@ -432,7 +432,7 @@
$file = basename($file);
if (empty($CFG->unzip)) { // Use built-in php-based unzip function
include_once('../lib/pclzip/pclzip.lib.php');
include_once("$CFG->libdir/pclzip/pclzip.lib.php");
$archive = new PclZip("$basedir/$wdir/$file");
if (!$list = $archive->extract("$basedir/$wdir")) {
error($archive->errorInfo(true));
@ -493,7 +493,7 @@
echo "<P ALIGN=CENTER>$strlistfiles:</P>";
$file = basename($file);
include_once('../lib/pclzip/pclzip.lib.php');
include_once("$CFG->libdir/pclzip/pclzip.lib.php");
$archive = new PclZip("$basedir/$wdir/$file");
if (!$list = $archive->listContent("$basedir/$wdir")) {
notify($archive->errorInfo(true));