summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2014-11-10 17:43:03 +0100
committerDavid Lawrence <dkl@mozilla.com>2014-11-10 17:43:03 +0100
commitc2533c1f2e7c5c4376eb0dae17c3380b04067678 (patch)
treee99e75084e43741926fba829497f03b2d1b1a017 /Bugzilla
parent613e77099b334526dd0d4e73383231e8332f3816 (diff)
downloadbugzilla-c2533c1f2e7c5c4376eb0dae17c3380b04067678.tar.gz
bugzilla-c2533c1f2e7c5c4376eb0dae17c3380b04067678.tar.xz
Bug 1067619: Pulse is not notified of changes to attachment flags
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Attachment.pm3
-rw-r--r--Bugzilla/Hook.pm24
2 files changed, 27 insertions, 0 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm
index 1302fc716..33a4c55a5 100644
--- a/Bugzilla/Attachment.pm
+++ b/Bugzilla/Attachment.pm
@@ -922,6 +922,9 @@ sub update {
Bugzilla->memcached->clear({ table => 'attachments', id => $self->id });
}
+ Bugzilla::Hook::process('attachment_end_of_update',
+ { object => $self, old_object => $old_self, changes => $changes });
+
return $changes;
}
diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm
index 5e3dca655..fff102232 100644
--- a/Bugzilla/Hook.pm
+++ b/Bugzilla/Hook.pm
@@ -151,6 +151,30 @@ This is a Bugzilla::User object of the user.
=back
+=head2 attachment_end_of_update
+
+Called during L<Bugzilla::Attachment/update>, after changes are made
+to the database, but while still inside a transaction.
+
+Params:
+
+=over
+
+=item C<object>
+
+The attachment object that C<update> was called on.
+
+=item C<old_object>
+
+The attachment object as it was before it was updated.
+
+=item C<changes>
+
+The fields that have been changed, in the same format that
+L<Bugzilla::Attachment/update> returns.
+
+=back
+
=head2 attachment_process_data
This happens at the very beginning process of the attachment creation.