summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xattachment.cgi2
-rw-r--r--extensions/Review/Extension.pm10
2 files changed, 12 insertions, 0 deletions
diff --git a/attachment.cgi b/attachment.cgi
index 3ff16eb44..dff537e2b 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -577,6 +577,8 @@ sub insert {
$obsolete_attachment->update($timestamp);
}
+ # BMO - allow pre-processing of attachment flags
+ Bugzilla::Hook::process('create_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);
diff --git a/extensions/Review/Extension.pm b/extensions/Review/Extension.pm
index 634e7c9cd..16429ccdd 100644
--- a/extensions/Review/Extension.pm
+++ b/extensions/Review/Extension.pm
@@ -365,6 +365,16 @@ sub _update_reviewers {
# reviewer requirements. instead we just throw an error.
sub post_bug_attachment_flags {
my ($self, $args) = @_;
+ $self->_check_review_flag($args);
+}
+
+sub create_attachment_flags {
+ my ($self, $args) = @_;
+ $self->_check_review_flag($args);
+}
+
+sub _check_review_flag {
+ my ($self, $args) = @_;
my $bug = $args->{bug};
my $cgi = Bugzilla->cgi;