]> git.mjollnir.org Git - moodle.git/commitdiff
Added the optional showstatus parameter to unzip_file() to avoid
authorstronk7 <stronk7>
Sat, 16 Oct 2004 16:33:40 +0000 (16:33 +0000)
committerstronk7 <stronk7>
Sat, 16 Oct 2004 16:33:40 +0000 (16:33 +0000)
sending any output if desired.

Merged from MOODLE_14_STABLE

lib/moodlelib.php

index 485ffd71f416299c06e0d8ef5e398b00d0e23ef9..a723546965bbdcdea7be2f90f8b041fbfee989b1 100644 (file)
@@ -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;
 }