summaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
authorcyeh%bluemartini.com <>2000-06-22 04:03:45 +0200
committercyeh%bluemartini.com <>2000-06-22 04:03:45 +0200
commiteac17c0469a8e2b84b58f33b8f8aeb2f2addc2a9 (patch)
treec352433fa36b956b16b96c46b67dabcd627112ab /process_bug.cgi
parentf64f22341d04df2c877507245ba79c1aa1a37e85 (diff)
downloadbugzilla-eac17c0469a8e2b84b58f33b8f8aeb2f2addc2a9.tar.gz
bugzilla-eac17c0469a8e2b84b58f33b8f8aeb2f2addc2a9.tar.xz
Checkin for Bug 42851 'Use listbox with input for CC management on bug form'
contributed by dave@intrec.com (Dave Miller)
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi13
1 files changed, 9 insertions, 4 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index 8b1226b3a..7665c1eda 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -20,6 +20,7 @@
#
# Contributor(s): Terry Weissman <terry@mozilla.org>
# Dan Mosedale <dmose@mozilla.org>
+# Dave Miller <dave@intrec.com>
use diagnostics;
use strict;
@@ -391,10 +392,14 @@ my $origCcString;
# form of the data it gets from $::FORM{'cc'}, so anything bogus from a
# security standpoint should trigger an abort there.
#
-if (defined $::FORM{'cc'} && defined $::FORM{'id'}) {
+if (defined $::FORM{'newcc'} && defined $::FORM{'id'}) {
$origCcSet->mergeFromDB("select who from cc where bug_id = $::FORM{'id'}");
+ $formCcSet->mergeFromDB("select who from cc where bug_id = $::FORM{'id'}");
$origCcString = $origCcSet->toString(); # cache a copy of the string vers
- $formCcSet->mergeFromString($::FORM{'cc'});
+ if ((exists $::FORM{'removecc'}) && (exists $::FORM{'cc'})) {
+ $formCcSet->removeItemsInArray(@{$::MFORM{'cc'}});
+ }
+ $formCcSet->mergeFromString($::FORM{'newcc'});
}
if ( Param('strictvaluechecks') ) {
@@ -789,7 +794,7 @@ The changes made were:
AppendComment($id, $::FORM{'who'}, $::FORM{'comment'});
}
- if (defined $::FORM{'cc'} && defined $::FORM{'id'}
+ if (defined $::FORM{'newcc'} && defined $::FORM{'id'}
&& ! $origCcSet->isEqual($formCcSet) ) {
# update the database to look like the form
@@ -802,7 +807,7 @@ The changes made were:
my $col = GetFieldID('cc');
my $origq = SqlQuote($origCcString);
- my $newq = SqlQuote($::FORM{'cc'});
+ my $newq = SqlQuote($formCcSet->toString());
SendSQL("INSERT INTO bugs_activity " .
"(bug_id,who,bug_when,fieldid,oldvalue,newvalue) VALUES " .
"($id,$whoid,'$timestamp',$col,$origq,$newq)");