X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=cgi%2Fpkgreport.cgi;h=a0d7685d73f28ba72220d68254b98b657d094ed5;hb=dfe9e7343c6b6e24b9413a65f3f7218c9872d8bf;hp=eb7a61a2101600c9196bed3ca1f8eafaf8e73293;hpb=04265c83beff7e1ccb28a88ff7257fe36b2fc45d;p=debbugs.git diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index eb7a61a..a0d7685 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -20,6 +20,7 @@ BEGIN{ binmode(STDOUT,':encoding(UTF-8)'); use POSIX qw(strftime nice); +use List::Util qw(uniq); use Debbugs::Config qw(:globals :text :config); @@ -228,7 +229,8 @@ our %cats = ( "ord" => [2,3,4,1,0,5], } ], "oldview" => [ qw(status severity) ], - "normal" => [ qw(status severity classification) ], + "normal" => [ qw(status severity classification) ], + raw => [{nam => 'Raw',def => 'Raw'}], ); if (exists $param{which} and exists $param{data}) { @@ -275,7 +277,8 @@ if (defined $param{usertag}) { } } -quitcgi("You have to choose something to select by") unless grep {exists $param{$_}} keys %package_search_keys; +quitcgi("You have to choose something to select by", '400 Bad Request') + unless grep {exists $param{$_}} keys %package_search_keys; my $Archived = $param{archive} ? " Archived" : ""; @@ -436,6 +439,7 @@ my $result = pkg_htmlizebugs(bugs => \@bugs, (exists $param{dist})?(dist => $param{dist}):(), ); +print "Cache-Control: public, max-age=300\n"; print "Content-Type: text/html; charset=utf-8\n\n"; print "\n"; @@ -493,6 +497,9 @@ print fill_in_template(template=>'cgi/pkgreport_javascript'); print qq(

Options

\n); +$param{orderings} = + [uniq((grep {!$hidden{$_}} keys %cats), + $param{ordering})]; print option_form(template => 'cgi/pkgreport_options', param => \%param, form_options => $form_options,