diff options
author | David Lawrence <dlawrence@mozilla.com> | 2011-10-05 00:25:23 +0200 |
---|---|---|
committer | David Lawrence <dlawrence@mozilla.com> | 2011-10-05 00:25:23 +0200 |
commit | 57584dc4744fea59833ef355f7513690d246c70f (patch) | |
tree | 805f2b2941eca17eaf97263165d11d9e676ad9d1 /attachment.cgi | |
parent | 785580c6c290b93fe25868cfbb5d4e300749de62 (diff) | |
download | bugzilla-57584dc4744fea59833ef355f7513690d246c70f.tar.gz bugzilla-57584dc4744fea59833ef355f7513690d246c70f.tar.xz |
more porting work
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-x | attachment.cgi | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/attachment.cgi b/attachment.cgi index 5eba13611..9fec1b2bd 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -76,6 +76,12 @@ local our $vars = {}; my $action = $cgi->param('action') || 'view'; my $format = $cgi->param('format') || ''; +# BMO: Don't allow updating of bugs if disabled +if (Bugzilla->params->{disable_bug_updates} && $cgi->request_method eq 'POST') { + ThrowErrorPage('bug/process/updates-disabled.html.tmpl', + 'Bug updates are currently disabled.'); +} + # You must use the appropriate urlbase/sslbase param when doing anything # but viewing an attachment, or a raw diff. if ($action ne 'view' @@ -497,7 +503,8 @@ sub enter { my $flag_types = Bugzilla::FlagType::match({'target_type' => 'attachment', 'product_id' => $bug->product_id, - 'component_id' => $bug->component_id}); + 'component_id' => $bug->component_id, + 'is_active' => 1}); $vars->{'flag_types'} = $flag_types; $vars->{'any_flags_requesteeble'} = grep { $_->is_requestable && $_->is_requesteeble } @$flag_types; |