summaryrefslogtreecommitdiffstats
path: root/buglist.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-11-03 23:48:37 +0100
committerlpsolit%gmail.com <>2007-11-03 23:48:37 +0100
commit7d00b5f696249725beead3c570d73e36ff59ffa3 (patch)
tree299597dea9cdd12c67d9ec8e90969c5e142738ba /buglist.cgi
parent16a1c874c190a2726ff8a9e9aadac12a37592023 (diff)
downloadbugzilla-7d00b5f696249725beead3c570d73e36ff59ffa3.tar.gz
bugzilla-7d00b5f696249725beead3c570d73e36ff59ffa3.tar.xz
Bug 23473: Implement the ability to reverse the sort order in buglist.cgi ("Ascending" and "Descending") - Patch by Alex Schuilenburg <alex@schuilenburg.org> r/a=LpSolit
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-xbuglist.cgi6
1 files changed, 4 insertions, 2 deletions
diff --git a/buglist.cgi b/buglist.cgi
index 0f98a3811..fa75778b9 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -873,6 +873,7 @@ if ($order) {
# A custom list of columns. Make sure each column is valid.
foreach my $fragment (split(/,/, $order)) {
$fragment = trim($fragment);
+ next unless $fragment;
# Accept an order fragment matching a column name, with
# asc|desc optionally following (to specify the direction)
if (grep($fragment =~ /^\Q$_\E(\s+(asc|desc))?$/, @columnnames, keys(%$columns))) {
@@ -893,11 +894,12 @@ if ($order) {
$order = join(",", @order);
# Now that we have checked that all columns in the order are valid,
# detaint the order string.
- trick_taint($order);
+ trick_taint($order) if $order;
};
}
}
-else {
+
+if (!$order) {
# DEFAULT
$order = "bugs.bug_status, bugs.priority, map_assigned_to.login_name, bugs.bug_id";
}