From b20dfc6e14fb68d0133a2182a011b97c77cb0f52 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Mon, 14 Feb 2005 17:40:07 +0000 Subject: [PATCH] Bad use of get_admin(). Thanks Penny! --- backup/restorelib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backup/restorelib.php b/backup/restorelib.php index b6414bd30b90d..9aff00ac2cc74 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -1484,6 +1484,9 @@ function restore_create_scales($restore,$xml_file) { //Now, if we have anything in scales, we have to restore that //scales if ($scales) { + //Get admin->id for later use + $admin = get_admin(); + $adminid = $admin->id; if ($scales !== true) { //Iterate over each scale foreach ($scales as $scale) { @@ -1531,7 +1534,7 @@ function restore_create_scales($restore,$xml_file) { $sca->userid = $user->new_id; } else { //Assign it to admin - $sca->userid = get_admin(); + $sca->userid = $adminid; } //The structure is equal to the db, so insert the scale $newid = insert_record ("scale",$sca);