Commit 15899fb5 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 243268: Cannot remove several flag inclusions/exclusions at once - Patch by…

Bug 243268: Cannot remove several flag inclusions/exclusions at once - Patch by Frédéric Buclin <LpSolit@gmail.com> r=timeless a=justdave
parent 91cc642e
...@@ -189,10 +189,12 @@ sub processCategoryChange { ...@@ -189,10 +189,12 @@ sub processCategoryChange {
push(@exclusions, $category) unless grep($_ eq $category, @exclusions); push(@exclusions, $category) unless grep($_ eq $category, @exclusions);
} }
elsif ($categoryAction eq 'removeInclusion') { 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') { 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 # Convert the array @clusions('prod_ID:comp_ID') back to a hash of
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment