From: Frédéric Buclin Date: Wed, 10 Nov 2010 23:42:59 +0000 (+0100) Subject: Bug 611129: Quicksearch fails in 3.6.3 if List::MoreUtils is not installed X-Git-Tag: bugzilla-3.6.4~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae3cb23cc7ae91574687ffb7037fa68adc674241;p=thirdparty%2Fbugzilla.git Bug 611129: Quicksearch fails in 3.6.3 if List::MoreUtils is not installed r/a=mkanat --- diff --git a/Bugzilla/Search/Quicksearch.pm b/Bugzilla/Search/Quicksearch.pm index f77bf6dedf..6ffc63b65b 100644 --- a/Bugzilla/Search/Quicksearch.pm +++ b/Bugzilla/Search/Quicksearch.pm @@ -31,7 +31,6 @@ use Bugzilla::Field; use Bugzilla::Util; use List::Util qw(min max); -use List::MoreUtils qw(firstidx); use base qw(Exporter); @Bugzilla::Search::Quicksearch::EXPORT = qw(quicksearch); @@ -447,9 +446,9 @@ sub _special_field_syntax { my $legal_priorities = get_legal_field_values('priority'); # If Pn exists explicitly, use it. - my $start = firstidx { $_ eq "P$p_start" } @$legal_priorities; + my $start = lsearch($legal_priorities, "P$p_start"); my $end; - $end = firstidx { $_ eq "P$p_end" } @$legal_priorities if defined $p_end; + $end = lsearch($legal_priorities, "P$p_end") if defined $p_end; # If Pn doesn't exist explicitly, then we mean the nth priority. if ($start == -1) {