aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-09-11 00:07:01 +0000
committerlpsolit%gmail.com <>2008-09-11 00:07:01 +0000
commit4fdb67308b0e095aa76e36581cc4e94357d61f6a (patch)
tree929dd29f66aa2aac4d312c589771ee8c13699349 /colchange.cgi
parentBug 452893: request.cgi crashes if a flag modification date is invalid - Patc... (diff)
downloadbugzilla-4fdb67308b0e095aa76e36581cc4e94357d61f6a.tar.gz
bugzilla-4fdb67308b0e095aa76e36581cc4e94357d61f6a.tar.bz2
bugzilla-4fdb67308b0e095aa76e36581cc4e94357d61f6a.zip
Bug 216557: Be able to specify the order of the columns in a bug list - Patch by Pascal Held <paheld+bugzilla@gmail.com> r=LpSolit r=pyrzak a=LpSolit
Diffstat (limited to 'colchange.cgi')
-rwxr-xr-xcolchange.cgi8
1 files changed, 4 insertions, 4 deletions
diff --git a/colchange.cgi b/colchange.cgi
index cb43b34e3..5c44df3ed 100755
--- a/colchange.cgi
+++ b/colchange.cgi
@@ -21,6 +21,7 @@
# Contributor(s): Terry Weissman <terry@mozilla.org>
# Gervase Markham <gerv@gerv.net>
# Max Kanat-Alexander <mkanat@bugzilla.org>
+# Pascal Held <paheld@gmail.com>
use strict;
@@ -94,10 +95,9 @@ if (defined $cgi->param('rememberedquery')) {
if (defined $cgi->param('resetit')) {
@collist = DEFAULT_COLUMN_LIST;
} else {
- foreach my $i (@masterlist) {
- if (defined $cgi->param("column_$i")) {
- push @collist, $i;
- }
+ if (defined $cgi->param("selected_columns")) {
+ my %legal_list = map { $_ => 1 } @masterlist;
+ @collist = grep { exists $legal_list{$_} } $cgi->param("selected_columns");
}
if (defined $cgi->param('splitheader')) {
$splitheader = $cgi->param('splitheader')? 1: 0;