Don't show progress bar when there's nothing worth showing

This commit is contained in:
moodler
2006-09-30 13:52:15 +00:00
parent 2719f3e2c9
commit 26ea488855
+4
View File
@@ -432,6 +432,10 @@ function print_progress($done, $total, $updatetime=5, $sleeptime=1, $donetext=''
static $starttime;
static $lasttime;
if ($total < 2) { // No need to show anything
return;
}
if (empty($starttime)) {
$starttime = $lasttime = time();
$lasttime = $starttime - $updatetime;