]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 291539: Flags get duplicated if multiple inclusions apply - Patch by Frédéric...
authorlpsolit%gmail.com <>
Sun, 22 May 2005 20:46:55 +0000 (20:46 +0000)
committerlpsolit%gmail.com <>
Sun, 22 May 2005 20:46:55 +0000 (20:46 +0000)
Bugzilla/FlagType.pm

index d07bb0b65f5fa3d5ad76c84b91cf6148e8644f3e..fdf790e7580a24f21b4d3a732e7bfca99a5c9ea6 100644 (file)
@@ -249,7 +249,9 @@ sub match {
     my @criteria = sqlify_criteria($criteria, \@tables);
     
     # Build the query, grouping the types if we are counting flags.
-    my $select_clause = "SELECT " . join(", ", @columns);
+    # DISTINCT is used in order to count flag types only once when
+    # they appear several times in the flaginclusions table.
+    my $select_clause = "SELECT DISTINCT " . join(", ", @columns);
     my $from_clause = "FROM " . join(" ", @tables);
     my $where_clause = "WHERE " . join(" AND ", @criteria);