]> git.donarmstrong.com Git - debbugs.git/blobdiff - cgi/pkgreport.cgi
pkgreport already has use warnings, does not need -T
[debbugs.git] / cgi / pkgreport.cgi
index 0bde19058362e71ec8dcb869165010e83ba9995e..8733d9a3198adfb1c9defc2f7eadeccc766c3e91 100755 (executable)
@@ -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,