summaryrefslogtreecommitdiffstats
path: root/editflagtypes.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 /editflagtypes.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 'editflagtypes.cgi')
-rwxr-xr-xeditflagtypes.cgi8
1 files changed, 6 insertions, 2 deletions
diff --git a/editflagtypes.cgi b/editflagtypes.cgi
index 4f85e6c65..d389c6db7 100755
--- a/editflagtypes.cgi
+++ b/editflagtypes.cgi
@@ -237,11 +237,15 @@ sub processCategoryChange {
}
elsif ($categoryAction eq 'removeInclusion') {
my @inclusion_to_remove = $cgi->param('inclusion_to_remove');
- @inclusions = map {(lsearch(\@inclusion_to_remove, $_) < 0) ? $_ : ()} @inclusions;
+ foreach my $remove (@inclusion_to_remove) {
+ @inclusions = grep { $_ ne $remove } @inclusions;
+ }
}
elsif ($categoryAction eq 'removeExclusion') {
my @exclusion_to_remove = $cgi->param('exclusion_to_remove');
- @exclusions = map {(lsearch(\@exclusion_to_remove, $_) < 0) ? $_ : ()} @exclusions;
+ foreach my $remove (@exclusion_to_remove) {
+ @exclusions = grep { $_ ne $remove } @exclusions;
+ }
}
# Convert the array @clusions('prod_ID:comp_ID') back to a hash of