From 49c4e3b294c8617972c2a65919533e3a630696eb Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Mon, 25 May 2009 17:02:59 +0000 Subject: Bug 494643: Do not pass the same columns twice to the SQL query - Patch by Frédéric Buclin r=wicked a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buglist.cgi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'buglist.cgi') 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); } } -- cgit v1.2.3-24-g4f1b