From: lpsolit%gmail.com <> Date: Mon, 25 May 2009 17:02:59 +0000 (+0000) Subject: Bug 494643: Do not pass the same columns twice to the SQL query - Patch by FrédÃ... X-Git-Tag: bugzilla-3.5.1~219 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49c4e3b294c8617972c2a65919533e3a630696eb;p=thirdparty%2Fbugzilla.git Bug 494643: Do not pass the same columns twice to the SQL query - Patch by Frédéric Buclin r=wicked a=LpSolit --- diff --git a/buglist.cgi b/buglist.cgi index 2eee0edd99..531d1500cf 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); } }