From 24d7737d4435bdea004fafcf02a6fbb02a6f26f8 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 26 Jun 2007 19:28:17 +0100 Subject: [PATCH] * Calculate the number of keys correctly in get_bugs_idx * Delete useless bugusertags from get_bugs_idx --- Debbugs/Bugs.pm | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Debbugs/Bugs.pm b/Debbugs/Bugs.pm index 848931f..010d671 100644 --- a/Debbugs/Bugs.pm +++ b/Debbugs/Bugs.pm @@ -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; -- 2.39.2