summaryrefslogtreecommitdiffstats
path: root/attachment.cgi
diff options
context:
space:
mode:
authorDavid Lawrence <dlawrence@mozilla.com>2011-10-05 00:25:23 +0200
committerDavid Lawrence <dlawrence@mozilla.com>2011-10-05 00:25:23 +0200
commit57584dc4744fea59833ef355f7513690d246c70f (patch)
tree805f2b2941eca17eaf97263165d11d9e676ad9d1 /attachment.cgi
parent785580c6c290b93fe25868cfbb5d4e300749de62 (diff)
downloadbugzilla-57584dc4744fea59833ef355f7513690d246c70f.tar.gz
bugzilla-57584dc4744fea59833ef355f7513690d246c70f.tar.xz
more porting work
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-xattachment.cgi9
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;