summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-03-12 04:31:36 +0100
committermkanat%kerio.com <>2005-03-12 04:31:36 +0100
commit4adb66027bc5424c10d5f829b6de20867bd4f015 (patch)
tree61f8c22ba041bbb71c0d3ac77880b29b552af661 /Bugzilla/User.pm
parent66b4c8717eb0a5bf89e3f02b5efab4daa8b9e1d5 (diff)
downloadbugzilla-4adb66027bc5424c10d5f829b6de20867bd4f015.tar.gz
bugzilla-4adb66027bc5424c10d5f829b6de20867bd4f015.tar.xz
Bug 285407: User cannot log in on PostgreSQL
Patch By Max Kanat-Alexander <mkanat@kerio.com> r=bugreport, a=myk
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r--Bugzilla/User.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 8045ee228..36179fcce 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -204,12 +204,14 @@ sub queries {
my $dbh = Bugzilla->dbh;
my $sth = $dbh->prepare(q{ SELECT
DISTINCT name, query, linkinfooter,
- IF(whine_queries.id IS NOT NULL, 1, 0)
+ CASE WHEN whine_queries.id
+ IS NOT NULL THEN 1 ELSE 0 END,
+ UPPER(name) AS uppername
FROM namedqueries
LEFT JOIN whine_queries
ON whine_queries.query_name = name
WHERE userid=?
- ORDER BY UPPER(name)});
+ ORDER BY uppername});
$sth->execute($self->{id});
my @queries;
@@ -494,8 +496,8 @@ sub derive_groups {
$group_sth ||= $dbh->prepare(q{SELECT grantor_id
FROM group_group_map
WHERE member_id=?
- AND grant_type=' .
- GROUP_MEMBERSHIP . '});
+ AND grant_type = } .
+ GROUP_MEMBERSHIP);
$group_sth->execute($group);
while (my ($groupid) = $group_sth->fetchrow_array) {
if (!defined($groupidschecked{"$groupid"})) {