]> git.donarmstrong.com Git - debbugs.git/commitdiff
* Calculate the number of keys correctly in get_bugs_idx
authorDon Armstrong <don@donarmstrong.com>
Tue, 26 Jun 2007 18:28:17 +0000 (19:28 +0100)
committerDon Armstrong <don@donarmstrong.com>
Tue, 26 Jun 2007 18:28:17 +0000 (19:28 +0100)
 * Delete useless bugusertags from get_bugs_idx

Debbugs/Bugs.pm

index 848931f79b8fcca9799324a814630ee2d77666a8..010d671618d20c05e9883d47463c0d67664626de 100644 (file)
@@ -415,20 +415,13 @@ sub get_bugs_by_idx{
      my @packages = __handle_pkg_src_and_maint(map {exists $param{$_}?($_,$param{$_}):()}
                                               qw(package src maint)
                                              );
-     my %usertag_bugs;
-     if (exists $param{tag} and exists $param{usertags}) {
-         # This complex slice makes a hash with the bugs which have the
-          # usertags passed in $param{tag} set.
-         @usertag_bugs{make_list(@{$param{usertags}}{make_list($param{tag})})
-                       } = (1) x make_list(@{$param{usertags}}{make_list($param{tag})});
-     }
      if (exists $param{package} or
         exists $param{src} or
         exists $param{maint}) {
          delete @param{qw(maint src)};
          $param{package} = [@packages];
      }
-     my $keys = keys(%param) - 1;
+     my $keys = grep {$_ !~ /^(archive|usertags|bugs)$/} keys(%param);
      die "Need at least 1 key to search by" unless $keys;
      my $arc = $param{archive} ? '-arc':'';
      my %idx;