summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-08-22 03:49:56 +0200
committermkanat%bugzilla.org <>2006-08-22 03:49:56 +0200
commitbb496330df5a3e0eaf8f40862e648ad698e6fa3b (patch)
treed8f8e9e9e6192a8501dfcb3d11c469fcc11a11e9 /Bugzilla
parent3f5c73cce7d1cc1b4e7323013a690d2eab225c1a (diff)
downloadbugzilla-bb496330df5a3e0eaf8f40862e648ad698e6fa3b.tar.gz
bugzilla-bb496330df5a3e0eaf8f40862e648ad698e6fa3b.tar.xz
Bug 348539: Move CC validation out of post_bug.cgi and into Bugzilla::Bug
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bkor, a=myk
Diffstat (limited to 'Bugzilla')
-rwxr-xr-xBugzilla/Bug.pm13
1 files changed, 13 insertions, 0 deletions
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) = @_;