diff options
author | cyeh%bluemartini.com <> | 2000-06-22 02:03:45 +0000 |
---|---|---|
committer | cyeh%bluemartini.com <> | 2000-06-22 02:03:45 +0000 |
commit | eac17c0469a8e2b84b58f33b8f8aeb2f2addc2a9 (patch) | |
tree | c352433fa36b956b16b96c46b67dabcd627112ab /Bugzilla | |
parent | forgot the reporter and URL fields (diff) | |
download | bugzilla-eac17c0469a8e2b84b58f33b8f8aeb2f2addc2a9.tar.gz bugzilla-eac17c0469a8e2b84b58f33b8f8aeb2f2addc2a9.tar.bz2 bugzilla-eac17c0469a8e2b84b58f33b8f8aeb2f2addc2a9.zip |
Checkin for Bug 42851 'Use listbox with input for CC management on bug form'
contributed by dave@intrec.com (Dave Miller)
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/RelationSet.pm | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Bugzilla/RelationSet.pm b/Bugzilla/RelationSet.pm index 92e2158f2..b5cae289c 100644 --- a/Bugzilla/RelationSet.pm +++ b/Bugzilla/RelationSet.pm @@ -18,6 +18,7 @@ # # Contributor(s): Dan Mosedale <dmose@mozilla.org> # Terry Weissman <terry@mozilla.org> +# Dave Miller <dave@intrec.com> # This object models a set of relations between one item and a group # of other items. An example is the set of relations between one bug @@ -179,6 +180,42 @@ sub mergeFromString { } } +# remove a set in string form from this set +# +sub removeItemsInString { + ($#_ == 1) || confess("invalid number of arguments"); + my $self = shift(); + + # do the merge + # + foreach my $person (split(/[ ,]/, shift())) { + if ($person ne "") { + my $dbid = &::DBNameToIdAndCheck($person); + if (exists $$self{$dbid}) { + delete $$self{$dbid}; + } + } + } +} + +# remove a set in array form from this set +# +sub removeItemsInArray { + ($#_ > 0) || confess("invalid number of arguments"); + my $self = shift(); + + # do the merge + # + while (my $person = shift()) { + if ($person ne "") { + my $dbid = &::DBNameToIdAndCheck($person); + if (exists $$self{$dbid}) { + delete $$self{$dbid}; + } + } + } +} + # return the number of elements in this set # sub size { |