From 5fc80f94271780b6ff6d1dbba554df35e803ac51 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Tue, 24 Nov 2009 06:09:41 +0000 Subject: Bug 430014: Re-write the code hooks system so that it uses modules instead of individual .pl files Patch by Max Kanat-Alexander (module owner) a=mkanat --- Bugzilla/Object.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Bugzilla/Object.pm') diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm index a1857db1c..92353b6a0 100644 --- a/Bugzilla/Object.pm +++ b/Bugzilla/Object.pm @@ -279,7 +279,7 @@ sub set { superclass => __PACKAGE__, function => 'Bugzilla::Object->set' }); - Bugzilla::Hook::process('object-before_set', + Bugzilla::Hook::process('object_before_set', { object => $self, field => $field, value => $value }); @@ -303,7 +303,7 @@ sub set_all { my $method = "set_$key"; $self->$method($params->{$key}); } - Bugzilla::Hook::process('object-end_of_set_all', { object => $self, + Bugzilla::Hook::process('object_end_of_set_all', { object => $self, params => $params }); } @@ -348,7 +348,7 @@ sub update { $dbh->do("UPDATE $table SET $columns WHERE $id_field = ?", undef, @values, $self->id) if @values; - Bugzilla::Hook::process('object-end_of_update', + Bugzilla::Hook::process('object_end_of_update', { object => $self, old_object => $old_self, changes => \%changes }); @@ -412,7 +412,7 @@ sub check_required_create_fields { # This hook happens here so that even subclasses that don't call # SUPER::create are still affected by the hook. - Bugzilla::Hook::process('object-before_create', { class => $class, + Bugzilla::Hook::process('object_before_create', { class => $class, params => $params }); foreach my $field ($class->REQUIRED_CREATE_FIELDS) { @@ -445,7 +445,7 @@ sub run_create_validators { $field_values{$field} = $value; } - Bugzilla::Hook::process('object-end_of_create_validators', + Bugzilla::Hook::process('object_end_of_create_validators', { class => $class, params => \%field_values }); return \%field_values; -- cgit v1.2.3-24-g4f1b