diff options
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-x | post_bug.cgi | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/post_bug.cgi b/post_bug.cgi index c0878b0da..87ebba9c4 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -60,6 +60,12 @@ unless ($cgi->param()) { exit; } +# BMO: Don't allow updating of bugs if disabled +if (Bugzilla->params->{disable_bug_updates}) { + ThrowErrorPage('bug/process/updates-disabled.html.tmpl', + 'Bug updates are currently disabled.'); +} + # Detect if the user already used the same form to submit a bug my $token = trim($cgi->param('token')); check_token_data($token, 'create_bug', 'index.cgi'); @@ -92,7 +98,9 @@ $template->process($format->{'template'}, $vars, \$comment) || ThrowTemplateError($template->error()); # Include custom fields editable on bug creation. -my @custom_bug_fields = grep {$_->type != FIELD_TYPE_MULTI_SELECT && $_->enter_bug} +my @custom_bug_fields = grep {$_->type != FIELD_TYPE_MULTI_SELECT + && $_->type != FIELD_TYPE_EXTENSION + && $_->enter_bug} Bugzilla->active_custom_fields; # Undefined custom fields are ignored to ensure they will get their default @@ -195,6 +203,7 @@ if (defined($cgi->upload('data')) || $cgi->param('attach_text')) { if ($attachment) { # Set attachment flags. + Bugzilla::Hook::process('post_bug_attachment_flags', { bug => $bug }); my ($flags, $new_flags) = Bugzilla::Flag->extract_flags_from_cgi( $bug, $attachment, $vars, SKIP_REQUESTEE_ON_ERROR); $attachment->set_flags($flags, $new_flags); @@ -209,6 +218,11 @@ if (defined($cgi->upload('data')) || $cgi->param('attach_text')) { } } +# Set bug_ignored from the hidden field +if (scalar $cgi->param('bug_ignored')) { + $bug->set_bug_ignored(1); +} + # Set bug flags. my ($flags, $new_flags) = Bugzilla::Flag->extract_flags_from_cgi($bug, undef, $vars, SKIP_REQUESTEE_ON_ERROR); |