From 9d202f2d562c0cb8299c832158811f2131c73e27 Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Tue, 3 May 2005 01:52:02 +0000 Subject: Bug 289043: Implicit joins should be replaced by explicit joins - installment C Patch By Tomas Kopal r=joel, a=justdave --- editusers.cgi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'editusers.cgi') 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'; -- cgit v1.2.1