summaryrefslogtreecommitdiffstats
path: root/editusers.cgi
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-03-16 09:27:14 +0100
committermkanat%kerio.com <>2005-03-16 09:27:14 +0100
commitb99cbd1d893ff0a730ab7187f409bcdf3c6f4aeb (patch)
treeb2769bdde9c44eefd7834dcbc18e67e66d6d1aa9 /editusers.cgi
parent94dcd5edee079a1bb67a0011711d25a4be0f14c6 (diff)
downloadbugzilla-b99cbd1d893ff0a730ab7187f409bcdf3c6f4aeb.tar.gz
bugzilla-b99cbd1d893ff0a730ab7187f409bcdf3c6f4aeb.tar.xz
Bug 174295: ANSI SQL requires all columns in SELECT to be in GROUP BY, unless they are in "aggregate" functions
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=joel, a=myk
Diffstat (limited to 'editusers.cgi')
-rwxr-xr-xeditusers.cgi7
1 files changed, 3 insertions, 4 deletions
diff --git a/editusers.cgi b/editusers.cgi
index 82ad50bcf..f72866982 100755
--- a/editusers.cgi
+++ b/editusers.cgi
@@ -682,6 +682,7 @@ sub userDataToVars {
my $userid = shift;
my $user = new Bugzilla::User($userid);
my $query;
+ my $dbh = Bugzilla->dbh;
$user->derive_groups();
@@ -717,8 +718,7 @@ sub userDataToVars {
AND directbless.user_id = ?
AND directbless.isbless = 1
AND directbless.grant_type = ?
- GROUP BY id
- },
+ } . $dbh->sql_group_by('id'),
'id', undef,
($userid, GRANT_DIRECT,
$userid, GRANT_REGEXP,
@@ -733,8 +733,7 @@ sub userDataToVars {
AND ggm.member_id = ugm.group_id
AND ugm.isbless = 0
AND ggm.grant_type = ?
- GROUP BY id
- };
+ } . $dbh->sql_group_by('id');
foreach (@{$dbh->selectall_arrayref($query, undef, ($userid, GROUP_BLESS))}) {
# Merge indirect bless permissions into permission variable.
$vars->{'permissions'}{${$_}[0]}{'indirectbless'} = 1;