From: lpsolit%gmail.com <> Date: Wed, 11 Jan 2006 21:19:53 +0000 (+0000) Subject: Bug 243268: Cannot remove several flag inclusions/exclusions at once - Patch by Frédé... X-Git-Tag: bugzilla-2.20.1~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9861f3ed932f8d469bcae4bfe2f26b6df3f11437;p=thirdparty%2Fbugzilla.git Bug 243268: Cannot remove several flag inclusions/exclusions at once - Patch by Frédéric Buclin r=timeless a=justdave --- diff --git a/editflagtypes.cgi b/editflagtypes.cgi index b7131df997..233f33bdc9 100755 --- a/editflagtypes.cgi +++ b/editflagtypes.cgi @@ -183,10 +183,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