diff options
author | Christian Legnitto <clegnitto@mozilla.com> | 2010-09-01 15:56:28 -0700 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-09-01 15:56:28 -0700 |
commit | cd51ea1922c051e9536c00cd97c5d18b39c1c023 (patch) | |
tree | 7a58191b4292764ecc28f5a0057d23dc0ccf204c /Bugzilla/Object.pm | |
parent | e2048adeb7d627aa89991be9c0d2dbbb5ce85928 (diff) | |
download | bugs-cd51ea1922c051e9536c00cd97c5d18b39c1c023.tar bugs-cd51ea1922c051e9536c00cd97c5d18b39c1c023.tar.gz bugs-cd51ea1922c051e9536c00cd97c5d18b39c1c023.tar.bz2 bugs-cd51ea1922c051e9536c00cd97c5d18b39c1c023.tar.xz bugs-cd51ea1922c051e9536c00cd97c5d18b39c1c023.zip |
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/Object.pm')
-rw-r--r-- | Bugzilla/Object.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm index 66dac9422..5b8576512 100644 --- a/Bugzilla/Object.pm +++ b/Bugzilla/Object.pm @@ -508,7 +508,12 @@ sub insert_create_data { $dbh->do("INSERT INTO $table (" . join(', ', @field_names) . ") VALUES ($qmarks)", undef, @values); my $id = $dbh->bz_last_key($table, $class->ID_FIELD); - return $class->new($id); + + my $object = $class->new($id); + + Bugzilla::Hook::process('object_end_of_create', { class => $class, + object => $object }); + return $object; } sub get_all { |