X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FCGI%2FPkgreport.pm;h=01e661f30d987fff3cee189cab1803e6c1a4607d;hb=e09c4d3c9adb00e42d9af5daf9b1d5dd04264e6b;hp=20d0a79f88c590a2049efb527d5d3041f70a7d21;hpb=166247271de11620df79c961a50b12c35a3ffcad;p=debbugs.git diff --git a/Debbugs/CGI/Pkgreport.pm b/Debbugs/CGI/Pkgreport.pm index 20d0a79..01e661f 100644 --- a/Debbugs/CGI/Pkgreport.pm +++ b/Debbugs/CGI/Pkgreport.pm @@ -99,7 +99,7 @@ sub generate_package_info{ binary_to_source(source_only => 1, scalar_only => 1, binary => $package, - exists $param{schema}?(schema => $param{schema}):(), + hash_slice(%param,qw(schema)), ); } @@ -355,28 +355,29 @@ sub pkg_htmlizebugs { } my $binary_to_source_cache = {}; - foreach my $bug (@bugs) { - my %status = %{get_bug_status(bug=>$bug, - (map {exists $param{$_}?($_,$param{$_}):()} - qw(dist version schema bugusertags) - ), - (exists $param{arch}?(arch => $param{arch}):(arch => $config{default_architectures})), - binary_to_source_cache => $binary_to_source_cache, - )}; - next unless %status; - next if bug_filter(bug => $bug, - status => \%status, - repeat_merged => $param{repeatmerged}, - seen_merged => \%seenmerged, - (keys %include ? (include => \%include):()), - (keys %exclude ? (exclude => \%exclude):()), - ); - - my $html = "
  • "; ##%d: %s\n
    ", - $html .= short_bug_status_html(status => \%status, - options => $param{options}, - ) . "\n"; - push @status, [ $bug, \%status, $html ]; + my $statuses = + get_bug_statuses(bug => \@bugs, + hash_slice(%param, + qw(dist version schema bugusertags), + ), + (exists $param{arch}?(arch => $param{arch}):(arch => $config{default_architectures})), + binary_to_source_cache => $binary_to_source_cache, + ); + for my $bug (sort {$a <=> $b} keys %{$statuses}) { + next unless %{$statuses->{$bug}}; + next if bug_filter(bug => $bug, + status => $statuses->{$bug}, + repeat_merged => $param{repeatmerged}, + seen_merged => \%seenmerged, + (keys %include ? (include => \%include):()), + (keys %exclude ? (exclude => \%exclude):()), + ); + + my $html = "
  • "; ##%d: %s\n
    ", + $html .= short_bug_status_html(status => $statuses->{$bug}, + options => $param{options}, + ) . "\n"; + push @status, [ $bug, $statuses->{$bug}, $html ]; } if ($param{bug_order} eq 'age') { # MWHAHAHAHA