summaryrefslogtreecommitdiffstats
path: root/editusers.cgi
diff options
context:
space:
mode:
authorjocuri%softhome.net <>2004-07-31 18:36:18 +0200
committerjocuri%softhome.net <>2004-07-31 18:36:18 +0200
commitb37e43b5ab5a2dda0d50aa1e32b816a799f79bf6 (patch)
treec324f0cdca9d3f482bcf4dec1dafb10d76f14e3b /editusers.cgi
parent7cea397f3ea0988b4edd4b2225fc65bf28b63611 (diff)
downloadbugzilla-b37e43b5ab5a2dda0d50aa1e32b816a799f79bf6.tar.gz
bugzilla-b37e43b5ab5a2dda0d50aa1e32b816a799f79bf6.tar.xz
Patch for bug 253360: replace IF() with CASE WHEN for database compatibility; patch by Tomas Kopal <Tomas.Kopal@altap.cz>; r=vladd, a=justdave.
Diffstat (limited to 'editusers.cgi')
-rwxr-xr-xeditusers.cgi6
1 files changed, 3 insertions, 3 deletions
diff --git a/editusers.cgi b/editusers.cgi
index 5b1c88e98..6d6c844ca 100755
--- a/editusers.cgi
+++ b/editusers.cgi
@@ -135,9 +135,9 @@ sub EmitFormElements ($$$$)
if($user ne "") {
print "</TR><TR><TH VALIGN=TOP ALIGN=RIGHT>Group Access:</TH><TD><TABLE><TR>";
SendSQL("SELECT groups.id, groups.name, groups.description, " .
- "MAX(IF(grant_type = " . GRANT_DIRECT . ", 1, 0))," .
- "MAX(IF(grant_type = " . GRANT_DERIVED . ", 1, 0))," .
- "MAX(IF(grant_type = " . GRANT_REGEXP . ", 1, 0))" .
+ "MAX(CASE WHEN grant_type = " . GRANT_DIRECT . " THEN 1 ELSE 0 END)," .
+ "MAX(CASE WHEN grant_type = " . GRANT_DERIVED . " THEN 1 ELSE 0 END)," .
+ "MAX(CASE WHEN grant_type = " . GRANT_REGEXP . " THEN 1 ELSE 0 END)" .
"FROM groups " .
"LEFT JOIN user_group_map " .
"ON user_group_map.group_id = groups.id " .