]> git.mjollnir.org Git - moodle.git/commitdiff
Add some browser output when restoring a lot of users. Merged from 19_STABLE
authorstronk7 <stronk7>
Sun, 3 Feb 2008 00:48:32 +0000 (00:48 +0000)
committerstronk7 <stronk7>
Sun, 3 Feb 2008 00:48:32 +0000 (00:48 +0000)
backup/restorelib.php

index e0b38829ae2b8f71fec6e2f45f0d4aed0dd3916a..bc1f7e00883215afbf781667944ba7394dd3da38 100644 (file)
@@ -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 "<br />";
+                        }
+                    }
+                    backup_flush(300);
+                }
+            } /// End of loop over all the users loaded from xml
         }
 
         return $status;