X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=cgi%2Fpkgreport.cgi;h=abf739dec4c544f55dcfebb88b3c99d8ad78f245;hb=975055914729daa5d622a6abe072be35a008b11e;hp=4f4ea800af986fcd38f0c58ba04dd8e121a41a95;hpb=03cad65103808bca0f63bc182e1b7827014471fe;p=debbugs.git diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index 4f4ea80..abf739d 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -18,7 +18,9 @@ BEGIN{ delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; } +binmode(STDOUT,':encoding(UTF-8)'); use POSIX qw(strftime nice); +use List::AllUtils qw(uniq); use Debbugs::Config qw(:globals :text :config); @@ -227,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}) { @@ -274,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" : ""; @@ -435,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"; @@ -492,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,