Permalink
Browse files

Added the optional showstatus parameter to unzip_file() to avoid

sending any output if desired.
  • Loading branch information...
1 parent 4bc418d commit 20b53a7ba2573b0a3c06565e13b895e874cdb10f stronk7 committed Oct 16, 2004
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/moodlelib.php
View
@@ -3225,7 +3225,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
@@ -3296,7 +3296,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;
}

0 comments on commit 20b53a7

Please sign in to comment.