summaryrefslogtreecommitdiffstats
path: root/checksetup.pl
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-04-05 06:52:03 +0200
committermkanat%kerio.com <>2005-04-05 06:52:03 +0200
commitf5f31fc070588c2075dd13a0fbabe8117e3aad76 (patch)
tree4a3bb48995143c84fcb8f222b420814e1c6e8eaf /checksetup.pl
parentd71d64d9372f1556cec96434179b4cb1f9668e92 (diff)
downloadbugzilla-f5f31fc070588c2075dd13a0fbabe8117e3aad76.tar.gz
bugzilla-f5f31fc070588c2075dd13a0fbabe8117e3aad76.tar.xz
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-xchecksetup.pl12
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