summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Hook.pm
diff options
context:
space:
mode:
authorChristian Legnitto <clegnitto@mozilla.com>2010-09-02 00:56:28 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-09-02 00:56:28 +0200
commitcd51ea1922c051e9536c00cd97c5d18b39c1c023 (patch)
tree7a58191b4292764ecc28f5a0057d23dc0ccf204c /Bugzilla/Hook.pm
parente2048adeb7d627aa89991be9c0d2dbbb5ce85928 (diff)
downloadbugzilla-cd51ea1922c051e9536c00cd97c5d18b39c1c023.tar.gz
bugzilla-cd51ea1922c051e9536c00cd97c5d18b39c1c023.tar.xz
Bug 587793: Add a new "object_end_of_create" hook so that extensions can
operate on any new objects r=mkanat, a=mkanat
Diffstat (limited to 'Bugzilla/Hook.pm')
-rw-r--r--Bugzilla/Hook.pm24
1 files changed, 22 insertions, 2 deletions
diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm
index 789ad8740..adcb7ff4b 100644
--- a/Bugzilla/Hook.pm
+++ b/Bugzilla/Hook.pm
@@ -210,8 +210,7 @@ Params:
=over
-=item C<bug> - The changed bug object, with all fields set to their updated
-values.
+=item C<bug> - The created bug object.
=item C<timestamp> - The timestamp used for all updates in this transaction,
as a SQL date string.
@@ -821,6 +820,27 @@ or remove standard object columns using this hook.
=back
+=head2 object_end_of_create
+
+Called at the end of L<Bugzilla::Object/create>, after all other changes are
+made to the database. This occurs inside a database transaction.
+
+Params:
+
+=over
+
+=item C<class>
+
+The name of the class that C<create> was called on. You can check this
+like C<< if ($class->isa('Some::Class')) >> in your code, to perform specific
+tasks for only certain classes.
+
+=item C<object>
+
+The created object.
+
+=back
+
=head2 object_end_of_create_validators
Called at the end of L<Bugzilla::Object/run_create_validators>. You can