X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=cgi%2Fpkgreport.cgi;h=8733d9a3198adfb1c9defc2f7eadeccc766c3e91;hb=a0d158a62824aab9f5182a5391f5bc56a301bd13;hp=0bde19058362e71ec8dcb869165010e83ba9995e;hpb=038d80fef24f5ba18f5b8d8dbe5cd6a9bf876910;p=debbugs.git diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index 0bde190..8733d9a 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # This script is part of debbugs, and is released # under the terms of the GPL version 2, or any later # version at your option. @@ -93,7 +93,7 @@ our %param = cgi_parameters(query => $q, single => [qw(ordering archive repeatmerged), qw(bug-rev pend-rev sev-rev), qw(maxdays mindays version), - qw(data which dist newest), + qw(data which dist), qw(noaffects), ], default => $default_params, @@ -328,8 +328,8 @@ my @bugs; # addusers for source and binary packages being searched for if (defined $config{usertag_package_domain}) { my @possible_packages; - if (exists $param{packages} and - defined $param{packages} + if (exists $param{package} and + defined $param{package} ) { # For binary packages, add the binary package and corresponding source package push @possible_packages, @@ -349,6 +349,7 @@ if (defined $config{usertag_package_domain}) { push @possible_packages, source_to_binary(binary_only => 1, source => $param{src}, + dist => [@{$config{distributions}}], @schema_arg, ); } @@ -372,7 +373,6 @@ while (my ($key,$value) = splice @temp, 0, 2) { my @entries = (); for my $entry (make_list($param{$key})) { # we'll handle newest below - next if $key eq 'newest'; my $extra = ''; if (exists $param{dist} and ($key eq 'package' or $key eq 'src')) { my %versions = get_versions(package => $entry, @@ -381,6 +381,7 @@ while (my ($key,$value) = splice @temp, 0, 2) { ($key eq 'src'?(arch => q(source)):()), no_source_arch => 1, return_archs => 1, + @schema_arg, ); my $verdesc; if (keys %versions > 1) { @@ -404,15 +405,11 @@ while (my ($key,$value) = splice @temp, 0, 2) { push @entries, $entry.$extra; } } - push @title,$value.' '.join(' or ', @entries) if @entries; -} -if (defined $param{newest}) { - my $newest_bug = newest_bug(); - @bugs = ($newest_bug - $param{newest} + 1) .. $newest_bug; - push @title, 'in '.@bugs.' newest reports'; - $param{bugs} = [exists $param{bugs}?make_list($param{bugs}):(), - @bugs, - ]; + if ($key eq 'newest') { + push @title, 'in '.join(' or ',@entries).' newest reports'; + } else { + push @title,$value.' '.join(' or ', @entries) if @entries; + } } my $title = $gBugs.' '.join(' and ', map {/ or /?"($_)":$_} @title); @@ -420,7 +417,6 @@ my $title = $gBugs.' '.join(' and ', map {/ or /?"($_)":$_} @title); #yeah for magick! @bugs = get_bugs((map {exists $param{$_}?($_,$param{$_}):()} - grep {$_ ne 'newest'} keys %package_search_keys, 'archive'), usertags => \%ut, @schema_arg,