summaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2010-09-01 23:05:08 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2010-09-01 23:05:08 +0200
commite2048adeb7d627aa89991be9c0d2dbbb5ce85928 (patch)
tree3d8eab04a5c68b1a9df9052b00cf4ffd05fb675b /process_bug.cgi
parent77b3addad28c0f3ffc1fb4db1fcdc00527aeb48d (diff)
downloadbugzilla-e2048adeb7d627aa89991be9c0d2dbbb5ce85928.tar.gz
bugzilla-e2048adeb7d627aa89991be9c0d2dbbb5ce85928.tar.xz
Bug 592480: Only one person is added to CC list when multiple are specified
r=dkl a=LpSolit
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi22
1 files changed, 9 insertions, 13 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index 3e7f66c97..4f8921559 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -287,37 +287,33 @@ foreach my $dep_field (qw(dependson blocked)) {
}
}
# Formulate the CC data into two arrays of users involved in this CC change.
-my (@cc_add, @cc_remove);
if (defined $cgi->param('newcc')
or defined $cgi->param('addselfcc')
or defined $cgi->param('removecc')
or defined $cgi->param('masscc'))
{
-
+ my (@cc_add, @cc_remove);
# If masscc is defined, then we came from buglist and need to either add or
# remove cc's... otherwise, we came from show_bug and may need to do both.
- my ($cc_add, $cc_remove) = "";
if (defined $cgi->param('masscc')) {
if ($cgi->param('ccaction') eq 'add') {
- $cc_add = $cgi->param('masscc');
+ @cc_add = $cgi->param('masscc');
} elsif ($cgi->param('ccaction') eq 'remove') {
- $cc_remove = $cgi->param('masscc');
+ @cc_remove = $cgi->param('masscc');
}
} else {
- $cc_add = $cgi->param('newcc');
- # We came from bug_form which uses a select box to determine what cc's
+ @cc_add = $cgi->param('newcc');
+ push(@cc_add, Bugzilla->user) if $cgi->param('addselfcc');
+
+ # We came from show_bug which uses a select box to determine what cc's
# need to be removed...
if ($cgi->param('removecc') && $cgi->param('cc')) {
- $cc_remove = join(",", $cgi->param('cc'));
+ @cc_remove = $cgi->param('cc');
}
}
- push(@cc_add, split(/[\s,]+/, $cc_add)) if $cc_add;
- push(@cc_add, Bugzilla->user) if $cgi->param('addselfcc');
-
- push(@cc_remove, split(/[\s,]+/, $cc_remove)) if $cc_remove;
+ $set_all_fields{cc} = { add => \@cc_add, remove => \@cc_remove };
}
-$set_all_fields{cc} = { add => \@cc_add, remove => \@cc_remove };
# Fields that can only be set on one bug at a time.
if (defined $cgi->param('id')) {