summaryrefslogtreecommitdiffstats
path: root/userprefs.cgi
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 /userprefs.cgi
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 'userprefs.cgi')
-rwxr-xr-xuserprefs.cgi12
1 files changed, 7 insertions, 5 deletions
diff --git a/userprefs.cgi b/userprefs.cgi
index eac0bb108..92e110f3b 100755
--- a/userprefs.cgi
+++ b/userprefs.cgi
@@ -177,8 +177,9 @@ sub DoEmail {
###########################################################################
if (Param("supportwatchers")) {
my $watched_ref = $dbh->selectcol_arrayref(
- "SELECT profiles.login_name FROM watch, profiles"
- . " WHERE watcher = ? AND watch.watched = profiles.userid",
+ "SELECT profiles.login_name FROM watch INNER JOIN profiles" .
+ " ON watch.watched = profiles.userid" .
+ " WHERE watcher = ?",
undef, $userid);
$vars->{'watchedusers'} = join(',', @$watched_ref);
@@ -307,9 +308,10 @@ sub SaveEmail {
sub DoPermissions {
my (@has_bits, @set_bits);
- SendSQL("SELECT DISTINCT name, description FROM groups, user_group_map " .
- "WHERE user_group_map.group_id = groups.id " .
- "AND user_id = $::userid " .
+ SendSQL("SELECT DISTINCT name, description FROM groups " .
+ "INNER JOIN user_group_map " .
+ "ON user_group_map.group_id = groups.id " .
+ "WHERE user_id = $::userid " .
"AND isbless = 0 " .
"ORDER BY name");
while (MoreSQLData()) {