Added the optional showstatus parameter to unzip_file() to avoid
sending any output if desired. Merged from MOODLE_14_STABLE
This commit is contained in:
+4
-2
@@ -4314,7 +4314,7 @@ function zip_files ($originalfiles, $destination) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function unzip_file ($zipfile, $destination = '') {
|
||||
function unzip_file ($zipfile, $destination = '', $showstatus = true) {
|
||||
//Unzip one zip file to a destination dir
|
||||
//Both parameters must be FULL paths
|
||||
//If destination isn't specified, it will be the
|
||||
@@ -4385,7 +4385,9 @@ function unzip_file ($zipfile, $destination = '') {
|
||||
}
|
||||
|
||||
//Display some info about the unzip execution
|
||||
unzip_show_status($list,$destpath);
|
||||
if ($showstatus) {
|
||||
unzip_show_status($list,$destpath);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user