Skip to content

Commit

Permalink
Bad use of get_admin(). Thanks Penny!
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Feb 14, 2005
1 parent 476f1ae commit b20dfc6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backup/restorelib.php
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b20dfc6

Please sign in to comment.