summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
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.