diff options
-rw-r--r-- | Bugzilla/FlagType.pm | 6 | ||||
-rw-r--r-- | extensions/FlagTypeComment/Extension.pm | 7 | ||||
-rw-r--r-- | template/en/default/admin/flag-type/edit.html.tmpl | 2 |
3 files changed, 12 insertions, 3 deletions
diff --git a/Bugzilla/FlagType.pm b/Bugzilla/FlagType.pm index 617ea54b7..f2afb6f95 100644 --- a/Bugzilla/FlagType.pm +++ b/Bugzilla/FlagType.pm @@ -52,6 +52,7 @@ use Bugzilla::Constants; use Bugzilla::Error; use Bugzilla::Util; use Bugzilla::Group; +use Bugzilla::Hook; use base qw(Bugzilla::Object); @@ -133,6 +134,8 @@ sub create { exclusions => $exclusions }); $flagtype->update(); + Bugzilla::Hook::process('flagtype_end_of_create', { type => $flagtype }); + $dbh->bz_commit_transaction(); return $flagtype; } @@ -201,6 +204,9 @@ sub update { undef, $self->id); } + Bugzilla::Hook::process('flagtype_end_of_update', + { type => $self, changed => $changes }); + $dbh->bz_commit_transaction(); return $changes; } diff --git a/extensions/FlagTypeComment/Extension.pm b/extensions/FlagTypeComment/Extension.pm index d9098a5db..8da6101ad 100644 --- a/extensions/FlagTypeComment/Extension.pm +++ b/extensions/FlagTypeComment/Extension.pm @@ -147,16 +147,17 @@ sub _set_ftc_states { sub flagtype_end_of_create { my ($self, $args) = @_; - _set_flagtypes($args->{id}); + _set_flagtypes($args->{type}); } sub flagtype_end_of_update { my ($self, $args) = @_; - _set_flagtypes($args->{id}); + _set_flagtypes($args->{type}); } sub _set_flagtypes { - my $flagtype_id = shift; + my $flag_type = shift; + my $flagtype_id = $flag_type->id; my $input = Bugzilla->input_params; my $dbh = Bugzilla->dbh; diff --git a/template/en/default/admin/flag-type/edit.html.tmpl b/template/en/default/admin/flag-type/edit.html.tmpl index 2cb985a47..46346d2ea 100644 --- a/template/en/default/admin/flag-type/edit.html.tmpl +++ b/template/en/default/admin/flag-type/edit.html.tmpl @@ -231,6 +231,8 @@ </td> </tr> + [% Hook.process('rows') %] + <tr> <th> </th> <td> |