summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Object.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/Object.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/Object.pm')
-rw-r--r--Bugzilla/Object.pm7
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 {