mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Full paths when including pclzip bug 1139
This commit is contained in:
parent
bd83d0a3a8
commit
5151ae66e3
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user