]> git.donarmstrong.com Git - debbugs.git/blobdiff - cgi/pkgreport.cgi
use cgi/pkgreport_javascript; documentation of included/excluded bugs stub
[debbugs.git] / cgi / pkgreport.cgi
index f8eb6a44aecb0091f54120f037f850826c8ded95..2efc87c8227f1595a23e0b39b9e7c32141da8a16 100755 (executable)
@@ -226,16 +226,15 @@ if (defined $param{maintenc}) {
      delete $param{maintenc}
 }
 
-
-if (not grep {exists $param{$_}} keys %package_search_keys and exists $param{users}) {
-     $param{usertag} = [make_list($param{users})];
-}
-
 if (exists $param{pkg}) {
      $param{package} = $param{pkg};
      delete $param{pkg};
 }
 
+if (not grep {exists $param{$_}} keys %package_search_keys and exists $param{users}) {
+     $param{usertag} = [make_list($param{users})];
+}
+
 my %bugusertags;
 my %ut;
 my %seen_users;
@@ -361,6 +360,22 @@ my $title = $gBugs.' '.join(' and ', map {/ or /?"($_)":$_} @title);
                 usertags => \%ut,
                );
 
+# shove in bugs which affect this package if there is a package or a
+# source given (by default), but no affects options given
+if (not exists $param{affects} and not exists $param{noaffects} and
+    (exists $param{source} or
+     exists $param{package})) {
+    push @bugs, get_bugs((map {exists $param{$_}?($_ =~ /^(?:package|source)$/?'affects':$_,
+                                                 ($_ eq 'source'?'src:'.$param{$_}:$param{$_})):()}
+                         grep {$_ ne 'newest'}
+                         keys %package_search_keys, 'archive'),
+                        usertags => \%ut,
+                       );
+}
+
+# filter out included or excluded bugs
+
+
 if (defined $param{version}) {
      $title .= " at version $param{version}";
 }
@@ -425,7 +440,7 @@ if (defined $pseudodesc and defined $pkg and exists $pseudodesc->{$pkg}) {
      delete $param{dist};
 }
 
-# output infomration about the packages
+# output information about the packages
 
 for my $package (make_list($param{package}||[])) {
      print generate_package_info(binary => 1,
@@ -455,7 +470,7 @@ if (exists $param{submitter}) {
 
 print $result;
 
-print pkg_javascript() . "\n";
+print fill_in_template(template=>'cgi/pkgreport_javascript');
 
 print qq(<h2 class="outstanding"><!--<a class="options" href="javascript:toggle(1)">-->Options<!--</a>--></h2>\n);