summaryrefslogtreecommitdiffstats
path: root/colchange.cgi
diff options
context:
space:
mode:
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;