]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 598698 - Remove unneeded selectrow_array() call in Bugzilla::Install::make_admin()
authorReed Loden <reed@reedloden.com>
Fri, 24 Sep 2010 21:06:34 +0000 (14:06 -0700)
committerReed Loden <reed@reedloden.com>
Fri, 24 Sep 2010 21:06:34 +0000 (14:06 -0700)
[r=mkanat a=mkanat]

Bugzilla/Install.pm

index 57b1904b5a64e2f561a87cb408c627bc2d81eb1a..9d4426bbe8c0a529ad59f7e44b9ccabaa4b15798 100644 (file)
@@ -345,14 +345,12 @@ sub make_admin {
     $user = ref($user) ? $user 
             : new Bugzilla::User(login_to_id($user, THROW_ERROR));
 
-    my $admin_group = new Bugzilla::Group({ name => 'admin' });
-
-    # Admins get explicit membership and bless capability for the admin group
-    $dbh->selectrow_array("SELECT id FROM groups WHERE name = 'admin'");
-
     my $group_insert = $dbh->prepare(
         'INSERT INTO user_group_map (user_id, group_id, isbless, grant_type)
               VALUES (?, ?, ?, ?)');
+
+    # Admins get explicit membership and bless capability for the admin group
+    my $admin_group = new Bugzilla::Group({ name => 'admin' });
     # These are run in an eval so that we can ignore the error of somebody
     # already being granted these things.
     eval {