From bb496330df5a3e0eaf8f40862e648ad698e6fa3b Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Tue, 22 Aug 2006 01:49:56 +0000 Subject: Bug 348539: Move CC validation out of post_bug.cgi and into Bugzilla::Bug Patch By Max Kanat-Alexander r=bkor, a=myk --- Bugzilla/Bug.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Bugzilla') diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 3e65ab9b3..343f49e18 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -288,6 +288,19 @@ sub _check_bug_status { return $status; } +sub _check_cc { + my ($ccs) = @_; + return [] unless $ccs; + + my %cc_ids; + foreach my $person (@$ccs) { + next unless $person; + my $id = login_to_id($person, THROW_ERROR); + $cc_ids{$id} = 1; + } + return [keys %cc_ids]; +} + sub _check_comment { my ($comment) = @_; -- cgit v1.2.3-24-g4f1b