summaryrefslogtreecommitdiffstats
path: root/report.cgi
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-04-22 20:02:17 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-04-22 20:02:17 +0200
commit271477d8c26794abd8310e2abb89b746204660af (patch)
treea4701a52f9ff1918e25a75e09267bfba0b063296 /report.cgi
parent3417cb73db6d2306a012d3c624e9bec92fa1a161 (diff)
downloadbugzilla-271477d8c26794abd8310e2abb89b746204660af.tar.gz
bugzilla-271477d8c26794abd8310e2abb89b746204660af.tar.xz
Bug 560009: Use firstidx from List::MoreUtils instead of lsearch
r=timello, a=mkanat
Diffstat (limited to 'report.cgi')
-rwxr-xr-xreport.cgi4
1 files changed, 3 insertions, 1 deletions
diff --git a/report.cgi b/report.cgi
index 33d46675f..4c9a98b8a 100755
--- a/report.cgi
+++ b/report.cgi
@@ -349,7 +349,9 @@ sub get_names {
# the normal order.
#
# This is O(n^2) but it shouldn't matter for short lists.
- @sorted = map {lsearch(\@unsorted, $_) == -1 ? () : $_} @{$field_list};
+ foreach my $item (@$field_list) {
+ push(@sorted, $item) if grep { $_ eq $item } @unsorted;
+ }
}
elsif ($isnumeric) {
# It's not a field we are preserving the order of, so sort it