mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Full paths when including pclzip bug 1139
This commit is contained in:
parent
bd83d0a3a8
commit
5151ae66e3
1 changed files with 3 additions and 3 deletions
|
@ -366,7 +366,7 @@
|
||||||
foreach ($USER->filelist as $file) {
|
foreach ($USER->filelist as $file) {
|
||||||
$files[] = "$basedir/$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");
|
$archive = new PclZip("$basedir/$wdir/$name");
|
||||||
if (($list = $archive->create($files,'',"$basedir/$wdir/")) == 0) {
|
if (($list = $archive->create($files,'',"$basedir/$wdir/")) == 0) {
|
||||||
error($archive->errorInfo(true));
|
error($archive->errorInfo(true));
|
||||||
|
@ -432,7 +432,7 @@
|
||||||
$file = basename($file);
|
$file = basename($file);
|
||||||
|
|
||||||
if (empty($CFG->unzip)) { // Use built-in php-based unzip function
|
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");
|
$archive = new PclZip("$basedir/$wdir/$file");
|
||||||
if (!$list = $archive->extract("$basedir/$wdir")) {
|
if (!$list = $archive->extract("$basedir/$wdir")) {
|
||||||
error($archive->errorInfo(true));
|
error($archive->errorInfo(true));
|
||||||
|
@ -493,7 +493,7 @@
|
||||||
echo "<P ALIGN=CENTER>$strlistfiles:</P>";
|
echo "<P ALIGN=CENTER>$strlistfiles:</P>";
|
||||||
$file = basename($file);
|
$file = basename($file);
|
||||||
|
|
||||||
include_once('../lib/pclzip/pclzip.lib.php');
|
include_once("$CFG->libdir/pclzip/pclzip.lib.php");
|
||||||
$archive = new PclZip("$basedir/$wdir/$file");
|
$archive = new PclZip("$basedir/$wdir/$file");
|
||||||
if (!$list = $archive->listContent("$basedir/$wdir")) {
|
if (!$list = $archive->listContent("$basedir/$wdir")) {
|
||||||
notify($archive->errorInfo(true));
|
notify($archive->errorInfo(true));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue