summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-05-25 19:02:59 +0200
committerlpsolit%gmail.com <>2009-05-25 19:02:59 +0200
commit49c4e3b294c8617972c2a65919533e3a630696eb (patch)
treef28e8075cbf261d1ca0c7d25e770417de35e16fb
parent62097c29203f5e5a5e63168298c3fd1f1b846fb0 (diff)
downloadbugzilla-49c4e3b294c8617972c2a65919533e3a630696eb.tar.gz
bugzilla-49c4e3b294c8617972c2a65919533e3a630696eb.tar.xz
Bug 494643: Do not pass the same columns twice to the SQL query - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wicked a=LpSolit
-rwxr-xr-xbuglist.cgi6
1 files changed, 4 insertions, 2 deletions
diff --git a/buglist.cgi b/buglist.cgi
index 2eee0edd9..531d1500c 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -824,7 +824,9 @@ if (lsearch(\@displaycolumns, "percentage_complete") >= 0) {
}
# Display columns are selected because otherwise we could not display them.
-push (@selectcolumns, @displaycolumns);
+foreach my $col (@displaycolumns) {
+ push (@selectcolumns, $col) if !grep($_ eq $col, @selectcolumns);
+}
# If the user is editing multiple bugs, we also make sure to select the product
# and status because the values of those fields determine what options the user
@@ -974,7 +976,7 @@ foreach my $fragment (split(/,/, $order)) {
$fragment = $columns->{$fragment}->{'name'};
}
- push @selectnames, $fragment;
+ push(@selectnames, $fragment) unless (grep { $fragment eq $_ } @selectnames);
}
}