diff options
author | mkanat%kerio.com <> | 2005-04-05 04:52:03 +0000 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-04-05 04:52:03 +0000 |
commit | f5f31fc070588c2075dd13a0fbabe8117e3aad76 (patch) | |
tree | 4a3bb48995143c84fcb8f222b420814e1c6e8eaf /checksetup.pl | |
parent | Bug 287483: Sanitycheck screams about "Bad value 0 found in components.initia... (diff) | |
download | bugzilla-f5f31fc070588c2075dd13a0fbabe8117e3aad76.tar.gz bugzilla-f5f31fc070588c2075dd13a0fbabe8117e3aad76.tar.bz2 bugzilla-f5f31fc070588c2075dd13a0fbabe8117e3aad76.zip |
Bug 286235: Implicit joins should be replaced by explicit joins - installment A
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=joel, a=myk
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-x | checksetup.pl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/checksetup.pl b/checksetup.pl index b4f9fb930..c46bcfec9 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -4090,7 +4090,7 @@ if (@admins) { my @groups = (); -$sth = $dbh->prepare("select id from groups"); +$sth = $dbh->prepare("SELECT id FROM groups"); $sth->execute(); while ( my @row = $sth->fetchrow_array() ) { push (@groups, $row[0]); @@ -4099,8 +4099,8 @@ while ( my @row = $sth->fetchrow_array() ) { # Prompt the user for the email address and name of an administrator. Create # that login, if it doesn't exist already, and make it a member of all groups. -$sth = $dbh->prepare("SELECT user_id FROM groups, user_group_map " . - "WHERE name = 'admin' AND id = group_id"); +$sth = $dbh->prepare("SELECT user_id FROM groups INNER JOIN user_group_map " . + "ON id = group_id WHERE name = 'admin'"); $sth->execute; # when we have no admin users, prompt for admin email address and password ... if ($sth->rows == 0) { @@ -4285,9 +4285,9 @@ if ($sth->rows == 0) { # Final checks... $sth = $dbh->prepare("SELECT user_id " . - "FROM groups, user_group_map " . - "WHERE groups.name = 'admin' " . - "AND groups.id = user_group_map.group_id"); + "FROM groups INNER JOIN user_group_map " . + "ON groups.id = user_group_map.group_id " . + "WHERE groups.name = 'admin'"); $sth->execute; my ($adminuid) = $sth->fetchrow_array; if (!$adminuid) { die "No administrator!" } # should never get here |