Ooops I commited some debug source code in previous
versions. Going back. Sorry.
This commit is contained in:
@@ -929,6 +929,7 @@
|
||||
$files = array();
|
||||
foreach ($filelist as $file) {
|
||||
//If directory, append "/"
|
||||
//Commented. Not needed wit version 2.0 of pclzip !!
|
||||
//if (is_dir($basedir."/".$file)) {
|
||||
// $file = $file."/";
|
||||
//}
|
||||
@@ -937,16 +938,16 @@
|
||||
$files[] = $basedir."/".$file;
|
||||
}
|
||||
include_once("$CFG->dirroot/lib/pclzip/pclzip.lib.php");
|
||||
include_once("$CFG->dirroot/lib/pclzip/pclerror.lib.php");
|
||||
include_once("$CFG->dirroot/lib/pclzip/pcltrace.lib.php");
|
||||
PclTraceOn(2);
|
||||
//include_once("$CFG->dirroot/lib/pclzip/pclerror.lib.php"); //Debug
|
||||
//include_once("$CFG->dirroot/lib/pclzip/pcltrace.lib.php"); //Debug
|
||||
//PclTraceOn(2); //Debug
|
||||
$archive = new PclZip("$basedir/$name");
|
||||
if (($list = $archive->create($files,PCLZIP_OPT_REMOVE_PATH,$basedir)) == 0) {
|
||||
error($archive->errorInfo(true));
|
||||
$status = false;
|
||||
}
|
||||
PclTraceDisplay();
|
||||
PclTraceOff();
|
||||
//PclTraceDisplay(); //Debug
|
||||
//PclTraceOff(); //Debug
|
||||
} else { // Use external zip program
|
||||
//echo "<br>Using external zip"; //Debug
|
||||
$files = "";
|
||||
|
||||
@@ -276,9 +276,9 @@
|
||||
//Cleanup temps (files and db)
|
||||
if ($status) {
|
||||
echo "<li>".get_string("cleaningtempdata");
|
||||
//if (!$status = clean_temp_data ($restore)) {
|
||||
// notify("Could not clean up temporary data from files and database");
|
||||
//}
|
||||
if (!$status = clean_temp_data ($restore)) {
|
||||
notify("Could not clean up temporary data from files and database");
|
||||
}
|
||||
}
|
||||
|
||||
//End the main ul
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
|
||||
if (empty($CFG->unzip)) { // Use built-in php-based unzip function
|
||||
include_once("$CFG->dirroot/lib/pclzip/pclzip.lib.php");
|
||||
include_once("$CFG->dirroot/lib/pclzip/pclerror.lib.php");
|
||||
include_once("$CFG->dirroot/lib/pclzip/pcltrace.lib.php");
|
||||
PclTraceOn(2);
|
||||
//include_once("$CFG->dirroot/lib/pclzip/pclerror.lib.php"); //Debug
|
||||
//include_once("$CFG->dirroot/lib/pclzip/pcltrace.lib.php"); //Debug
|
||||
//PclTraceOn(2); //Debug
|
||||
$archive = new PclZip($file);
|
||||
if (!$list = $archive->extract(dirname($file))) {
|
||||
$status = false;
|
||||
}
|
||||
PclTraceDisplay();
|
||||
PclTraceOff();
|
||||
//PclTraceDisplay(); //Debug
|
||||
//PclTraceOff(); //Debug
|
||||
} else { // Use external unzip program
|
||||
$command = "cd ".dirname($file)."; $CFG->unzip -o ".basename($file);
|
||||
Exec($command);
|
||||
|
||||
Reference in New Issue
Block a user