Solved two bugs when restoring and groups or events exists in destination
authorstronk7 <stronk7>
Sun, 22 Feb 2004 22:22:58 +0000 (22:22 +0000)
committerstronk7 <stronk7>
Sun, 22 Feb 2004 22:22:58 +0000 (22:22 +0000)
course.

backup/restorelib.php

index e1d6d5effafb78b197eb600eb7aee89f3e2d7d16..efd435f4b83f65bd238b64e884de544dcde59f6b 100644 (file)
                             $newid = insert_record ("groups",$gro);
                         } else { 
                             //get current group id
-                            $newid = $group_db->id;
+                            $newid = $gro_db->id;
                         }
                         if ($newid) {
                             //We have the newid, update backup_ids
 
                             //The structure is equal to the db, so insert the event
                             $newid = insert_record ("event",$eve);
+                        } else {
+                            //get current event id
+                            $newid = $eve_db->id;
                         }
                         if ($newid) {
                             //We have the newid, update backup_ids