summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
authorDavid Lawrence <dlawrence@mozilla.com>2011-08-22 19:21:08 +0200
committerDavid Lawrence <dlawrence@mozilla.com>2011-08-22 19:21:08 +0200
commit9344a458c830ba066b9004c301d0fc6cabc8f229 (patch)
treeff06e420d70da1459af478c2619fb18900591d5c /post_bug.cgi
parentf30b939630917a63bc733e3963869643eeccdc90 (diff)
parentdd7eacbef2571efe55e5b18d80e93837dc6619d1 (diff)
downloadbugzilla-9344a458c830ba066b9004c301d0fc6cabc8f229.tar.gz
bugzilla-9344a458c830ba066b9004c301d0fc6cabc8f229.tar.xz
merged with bugzilla/4.2
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi9
1 files changed, 6 insertions, 3 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index 6d6ed746c..6ca46fb3c 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -153,14 +153,17 @@ my %bug_params;
foreach my $field (@bug_fields) {
$bug_params{$field} = $cgi->param($field);
}
-$bug_params{'cc'} = [$cgi->param('cc')];
-$bug_params{'groups'} = [$cgi->param('groups')];
-$bug_params{'comment'} = $comment;
+foreach my $field (qw(cc groups)) {
+ next if !$cgi->should_set($field);
+ $bug_params{$field} = [$cgi->param($field)];
+}
+$bug_params{'comment'} = $comment;
my @multi_selects = grep {$_->type == FIELD_TYPE_MULTI_SELECT && $_->enter_bug}
Bugzilla->active_custom_fields;
foreach my $field (@multi_selects) {
+ next if !$cgi->should_set($field->name);
$bug_params{$field->name} = [$cgi->param($field->name)];
}