]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 243268: Cannot remove several flag inclusions/exclusions at once - Patch by Frédé...
authorlpsolit%gmail.com <>
Wed, 11 Jan 2006 21:19:53 +0000 (21:19 +0000)
committerlpsolit%gmail.com <>
Wed, 11 Jan 2006 21:19:53 +0000 (21:19 +0000)
editflagtypes.cgi

index b7131df997dac2d86aa2f5a31c5391cc53f3fa38..233f33bdc91751662ae9106b1f9ea1cc043f931e 100755 (executable)
@@ -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