aboutsummaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-04-22 11:02:17 -0700
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-04-22 11:02:17 -0700
commit271477d8c26794abd8310e2abb89b746204660af (patch)
treea4701a52f9ff1918e25a75e09267bfba0b063296 /process_bug.cgi
parent3417cb73db6d2306a012d3c624e9bec92fa1a161 (diff)
downloadbugs-271477d8c26794abd8310e2abb89b746204660af.tar
bugs-271477d8c26794abd8310e2abb89b746204660af.tar.gz
bugs-271477d8c26794abd8310e2abb89b746204660af.tar.bz2
bugs-271477d8c26794abd8310e2abb89b746204660af.tar.xz
bugs-271477d8c26794abd8310e2abb89b746204660af.zip
Bug 560009: Use firstidx from List::MoreUtils instead of lsearch
r=timello, a=mkanat
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi3
1 files changed, 2 insertions, 1 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index 6afb9cc91..3f1e81bcb 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -61,6 +61,7 @@ use Bugzilla::Flag;
use Bugzilla::Status;
use Bugzilla::Token;
+use List::MoreUtils qw(firstidx);
use Storable qw(dclone);
my $user = Bugzilla->login(LOGIN_REQUIRED);
@@ -208,7 +209,7 @@ if (defined $cgi->param('id')) {
if ($cgi->cookie("BUGLIST")) {
@bug_list = split(/:/, $cgi->cookie("BUGLIST"));
}
- my $cur = lsearch(\@bug_list, $cgi->param('id'));
+ my $cur = firstidx { $_ eq $cgi->param('id') } @bug_list;
if ($cur >= 0 && $cur < $#bug_list) {
my $next_bug_id = $bug_list[$cur + 1];
detaint_natural($next_bug_id);