]> git.mjollnir.org Git - moodle.git/commitdiff
Added the backup_flush function use to send some data to the browser
authorstronk7 <stronk7>
Thu, 12 Jun 2003 17:29:16 +0000 (17:29 +0000)
committerstronk7 <stronk7>
Thu, 12 Jun 2003 17:29:16 +0000 (17:29 +0000)
flushing output inmediately

backup/lib.php

index dd5aba21d0cb852cc10b84900d66990ab5effbb9..b5f840274f01f566a068185345b8bde3ca093a35 100644 (file)
         }
 
     }
+
+    //This function send n white characters to the browser and flush the
+    //output buffer. Used to avoid browser timeouts and to show the progress.
+    function backup_flush($n=0,$time=false) {
+        if ($time) {
+            $ti = strftime("%X",time());
+        } else {
+            $ti = "";
+        }
+        echo str_repeat(" ", $n) . $ti . "\n";
+        flush();
+    }
     
 
 ?>