diff options
author | lpsolit%gmail.com <> | 2006-01-11 21:16:39 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-01-11 21:16:39 +0000 |
commit | 15899fb54c7f2118a20078b1d33a0e346551b92a (patch) | |
tree | 694785f15752b4a79bbefe57c572317b43840c7d /editflagtypes.cgi | |
parent | Bug 285614: Rewrite importxml.pl to remove XML::Parser magic numbers - Patch ... (diff) | |
download | bugzilla-15899fb54c7f2118a20078b1d33a0e346551b92a.tar.gz bugzilla-15899fb54c7f2118a20078b1d33a0e346551b92a.tar.bz2 bugzilla-15899fb54c7f2118a20078b1d33a0e346551b92a.zip |
Bug 243268: Cannot remove several flag inclusions/exclusions at once - Patch by Frédéric Buclin <LpSolit@gmail.com> r=timeless a=justdave
Diffstat (limited to 'editflagtypes.cgi')
-rwxr-xr-x | editflagtypes.cgi | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/editflagtypes.cgi b/editflagtypes.cgi index c8eb159c2..dfef55647 100755 --- a/editflagtypes.cgi +++ b/editflagtypes.cgi @@ -189,10 +189,12 @@ sub processCategoryChange { push(@exclusions, $category) unless grep($_ eq $category, @exclusions); } elsif ($categoryAction eq 'removeInclusion') { - @inclusions = map(($_ eq $cgi->param('inclusion_to_remove') ? () : $_), @inclusions); + my @inclusion_to_remove = $cgi->param('inclusion_to_remove'); + @inclusions = map {(lsearch(\@inclusion_to_remove, $_) < 0) ? $_ : ()} @inclusions; } elsif ($categoryAction eq 'removeExclusion') { - @exclusions = map(($_ eq $cgi->param('exclusion_to_remove') ? () : $_), @exclusions); + my @exclusion_to_remove = $cgi->param('exclusion_to_remove'); + @exclusions = map {(lsearch(\@exclusion_to_remove, $_) < 0) ? $_ : ()} @exclusions; } # Convert the array @clusions('prod_ID:comp_ID') back to a hash of |