]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2001-11-17 06:45:41 by doogie]
authordoogie <>
Sat, 17 Nov 2001 14:45:41 +0000 (06:45 -0800)
committerdoogie <>
Sat, 17 Nov 2001 14:45:41 +0000 (06:45 -0800)
Add support for reversing the order that bugs are displayed(this does not
affect severity or status ordering).

cgi/common.pl
cgi/pkgreport.cgi

index 8c52ef706ed80731a6fc3376ea73cc34ca00a48e..ccced58b2756240c8a3e5b1726828549c837d9a8 100644 (file)
@@ -8,6 +8,7 @@ my $common_repeatmerged = 1;
 my %common_include = ();
 my %common_exclude = ();
 my $common_raw_sort = 0;
+my $common_bug_reverse = 0;
 
 my $debug = 0;
 
@@ -18,6 +19,7 @@ sub set_option {
     if ($opt eq "exclude") { %common_exclude = %{$val}; }
     if ($opt eq "include") { %common_include = %{$val}; }
     if ($opt eq "raw") { $common_raw_sort = $val; }
+    if ($opt eq "bug-rev") { $common_bug_reverse = $val; }
 }
 
 sub readparse {
@@ -243,7 +245,12 @@ sub htmlizebugs {
         return "<HR><H2>No reports found!</H2></HR>\n";
     }
 
-    foreach my $bug (sort {$a<=>$b} @bugs) {
+    if ( $common_bug_reverse ) {
+       @bugs = sort {$b<=>$a} @bugs;
+    } else {
+       @bugs = sort {$a<=>$b} @bugs;
+    }
+    foreach my $bug (@bugs) {
        my %status = %{getbugstatus($bug)};
         next unless %status;
        my @merged = sort {$a<=>$b} ($bug, split(/ /, $status{mergedwith}));
index 103edd3c1521bd3fa07654a07fb8a5ffc6baa4a0..5690eb3e37f682757e3652eead6214da3aca5c09 100755 (executable)
@@ -33,6 +33,7 @@ my $archive = ($param{'archive'} || "no") eq "yes";
 my $include = $param{'include'} || "";
 my $exclude = $param{'exclude'} || "";
 my $raw_sort = ($param{'raw'} || "no") eq "yes";
+my $bug_rev = ($param{'bug-rev'} || "no") eq "yes";
 
 my $Archived = $archive ? " Archived" : "";
 
@@ -56,6 +57,7 @@ set_option("include", { map {if (m/^(.*):(.*)$/) { ($1,$2) } else { ($_,1) }} (s
 set_option("exclude", { map {if (m/^(.*):(.*)$/) { ($1,$2) } else { ($_,1) }} (split /[\s,]+/, $exclude) })
        if ($exclude);
 set_option("raw", $raw_sort);
+set_option("bug-rev", $bug_rev);
 
 my $tag;
 my @bugs;