]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Patch for bug 248001: Conversion of boolean conditions in SQL statements for better...
authorjocuri%softhome.net <>
Sat, 3 Jul 2004 07:26:28 +0000 (07:26 +0000)
committerjocuri%softhome.net <>
Sat, 3 Jul 2004 07:26:28 +0000 (07:26 +0000)
Bugzilla/Bug.pm
buglist.cgi
editgroups.cgi
request.cgi

index bef512e0f7acdbd1f39c2319bf9867207f131714..91cd0d8c8292654bd6cb9507a8883cacfe0a5228 100755 (executable)
@@ -342,11 +342,11 @@ sub groups {
              " LEFT JOIN user_group_map" .
              " ON user_group_map.group_id = groups.id" .
              " AND user_id = $::userid" .
-             " AND NOT isbless" .
+             " AND isbless = 0" .
              " LEFT JOIN group_control_map" .
              " ON group_control_map.group_id = groups.id" .
              " AND group_control_map.product_id = " . $self->{'product_id'} .
-             " WHERE isbuggroup");
+             " WHERE isbuggroup = 1");
 
     while (&::MoreSQLData()) {
         my ($groupid, $name, $description, $ison, $ingroup, $isactive,
index 98b7ff116b9976085ad23568129beeb51d645f1a..2607628d02b6fbdd4d2a56ef761c112aab403f5c 100755 (executable)
@@ -246,9 +246,9 @@ sub GetGroupsByUserId {
     SendSQL("
         SELECT DISTINCT  groups.id, name, description, isactive
                    FROM  groups, user_group_map
-                  WHERE  user_id = $userid AND NOT isbless
+                  WHERE  user_id = $userid AND isbless = 0
                     AND  user_group_map.group_id = groups.id
-                    AND  isbuggroup
+                    AND  isbuggroup = 1
                ORDER BY  description ");
 
     my @groups;
index a0af0be122ebdd71aeec5b8f10beaf864693b541..4390b5d4463e5cf8c677aa33800f68d6d670eb04 100755 (executable)
@@ -274,7 +274,7 @@ if ($action eq 'changeform') {
              " LEFT JOIN group_group_map as B" .
              " ON B.member_id = groups.id" .
              " AND B.grantor_id = $group_id" .
-             " AND B.isbless" .
+             " AND B.isbless = 1" .
              " WHERE groups.id != $group_id ORDER by name");
 
     while (MoreSQLData()) {
index 43be69856339c9cd1679000c24754e3f708a1455..e330c2c832ee70419e7b3461f98cd0fb578155b3 100755 (executable)
@@ -81,8 +81,8 @@ sub queue {
     # should not have access.
     "            COUNT(DISTINCT ugmap.group_id) AS cntuseringroups, 
                 COUNT(DISTINCT bgmap.group_id) AS cntbugingroups, 
-                ((COUNT(DISTINCT ccmap.who) AND cclist_accessible) 
-                  OR ((bugs.reporter = $::userid) AND bugs.reporter_accessible) 
+                ((COUNT(DISTINCT ccmap.who) AND cclist_accessible = 1
+                  OR ((bugs.reporter = $::userid) AND bugs.reporter_accessible = 1
                   OR bugs.assigned_to = $::userid ) AS canseeanyway 
     " . 
     # Use the flags and flagtypes tables for information about the flags,