}
//Display some info about the unzip execution
- unzip_show_status($list);
+ unzip_show_status($list,$destpath);
return true;
}
}
}
-function unzip_show_status ($list) {
+function unzip_show_status ($list,$removepath) {
//This function shows the results of the unzip execution
//depending of the value of the $CFG->zip, results will be
//text or an array of files.
global $CFG;
if (empty($CFG->unzip)) { // Use built-in php-based zip function
+ $strname = get_string("name");
+ $strsize = get_string("size");
+ $strmodified = get_string("modified");
+ $strstatus = get_string("status");
echo "<table cellpadding=\"4\" cellspacing=\"2\" border=\"0\" width=640>";
echo "<tr><th align=left>$strname</th>";
echo "<th align=right>$strsize</th>";
echo "<th align=right>$strstatus</th></tr>";
foreach ($list as $item) {
echo "<tr>";
- $item['filename'] = str_replace(cleardoubleslashes("$basedir/$wdir/"), "", $item['filename']);
+ $item['filename'] = str_replace(cleardoubleslashes($removepath).'/', "", $item['filename']);
print_cell("left", $item['filename']);
if (! $item['folder']) {
print_cell("right", display_size($item['size']));