Commit 49c4e3b2 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 494643: Do not pass the same columns twice to the SQL query - Patch by…

Bug 494643: Do not pass the same columns twice to the SQL query - Patch by Fré©ric Buclin <LpSolit@gmail.com> r=wicked a=LpSolit
parent 62097c29
...@@ -824,7 +824,9 @@ if (lsearch(\@displaycolumns, "percentage_complete") >= 0) { ...@@ -824,7 +824,9 @@ if (lsearch(\@displaycolumns, "percentage_complete") >= 0) {
} }
# Display columns are selected because otherwise we could not display them. # 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 # 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 # and status because the values of those fields determine what options the user
...@@ -974,7 +976,7 @@ foreach my $fragment (split(/,/, $order)) { ...@@ -974,7 +976,7 @@ foreach my $fragment (split(/,/, $order)) {
$fragment = $columns->{$fragment}->{'name'}; $fragment = $columns->{$fragment}->{'name'};
} }
push @selectnames, $fragment; push(@selectnames, $fragment) unless (grep { $fragment eq $_ } @selectnames);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment