diff options
author | mkanat%kerio.com <> | 2005-03-12 04:31:36 +0100 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-03-12 04:31:36 +0100 |
commit | 4adb66027bc5424c10d5f829b6de20867bd4f015 (patch) | |
tree | 61f8c22ba041bbb71c0d3ac77880b29b552af661 | |
parent | 66b4c8717eb0a5bf89e3f02b5efab4daa8b9e1d5 (diff) | |
download | bugzilla-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
-rw-r--r-- | Bugzilla/User.pm | 10 |
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"})) { |