summaryrefslogtreecommitdiffstats
path: root/editusers.cgi
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-05-03 03:52:02 +0200
committermkanat%kerio.com <>2005-05-03 03:52:02 +0200
commit9d202f2d562c0cb8299c832158811f2131c73e27 (patch)
tree97f5a0406de60ca7da9fffe0fd1cd459c6c0a201 /editusers.cgi
parent95859bf15300cddd1ece82e8224367638f956f20 (diff)
downloadbugzilla-9d202f2d562c0cb8299c832158811f2131c73e27.tar.gz
bugzilla-9d202f2d562c0cb8299c832158811f2131c73e27.tar.xz
Bug 289043: Implicit joins should be replaced by explicit joins - installment C
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=joel, a=justdave
Diffstat (limited to 'editusers.cgi')
-rwxr-xr-xeditusers.cgi7
1 files changed, 4 insertions, 3 deletions
diff --git a/editusers.cgi b/editusers.cgi
index 9c7a79397..74ad463fd 100755
--- a/editusers.cgi
+++ b/editusers.cgi
@@ -622,13 +622,14 @@ sub groupsUserMayBless {
$connector = 'WHERE';
} else {
$query = qq{SELECT DISTINCT $fieldList
- FROM groups, user_group_map AS ugm
+ FROM groups
+ LEFT JOIN user_group_map AS ugm
+ ON groups.id = ugm.group_id
LEFT JOIN group_group_map AS ggm
ON ggm.member_id = ugm.group_id
AND ggm.grant_type = ?
WHERE user_id = ?
- AND ((id = group_id AND isbless = 1) OR
- (id = grantor_id))
+ AND (ugm.isbless = 1 OR groups.id = ggm.grantor_id)
};
@bindValues = (GROUP_BLESS, $userid);
$connector = 'AND';