From 1f340c06dab346b0b97fa241f32150fecc9933d2 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 3 Feb 2008 00:48:32 +0000 Subject: [PATCH] Add some browser output when restoring a lot of users. Merged from 19_STABLE --- backup/restorelib.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/backup/restorelib.php b/backup/restorelib.php index e0b38829ae2..bc1f7e00883 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -2244,6 +2244,8 @@ define('RESTORE_GROUPS_GROUPINGS', 3); $languages = get_list_of_languages(); + /// Iterate over all users loaded from xml + $counter = 0; foreach ($info->users as $userid) { $rec = backup_getid($restore->backup_unique_code,"user",$userid); $user = $rec->info; @@ -2523,7 +2525,18 @@ define('RESTORE_GROUPS_GROUPINGS', 3); } } } - } + //Do some output + $counter++; + if ($counter % 10 == 0) { + if (!defined('RESTORE_SILENTLY')) { + echo "."; + if ($counter % 200 == 0) { + echo "
"; + } + } + backup_flush(300); + } + } /// End of loop over all the users loaded from xml } return $status;