From: stronk7 Date: Thu, 12 Jun 2003 17:29:16 +0000 (+0000) Subject: Added the backup_flush function use to send some data to the browser X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=60b420af996bc3baab7f48f70a29293f77207a4c;p=moodle.git Added the backup_flush function use to send some data to the browser flushing output inmediately --- diff --git a/backup/lib.php b/backup/lib.php index dd5aba21d0..b5f840274f 100644 --- a/backup/lib.php +++ b/backup/lib.php @@ -365,6 +365,18 @@ } } + + //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(); + } ?>