diff options
author | Dave Miller <justdave@bugzilla.org> | 2024-04-28 00:31:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-28 00:31:36 -0400 |
commit | 340c5f43bf00ad5723f8c91ee38c7893714c54ac (patch) | |
tree | 416ec100880344ab166eb9eee3cfe3dd94db06ee | |
parent | d2c64a9da3821bc7769ab5789ec928a26223b935 (diff) | |
download | bugs-340c5f43bf00ad5723f8c91ee38c7893714c54ac.tar bugs-340c5f43bf00ad5723f8c91ee38c7893714c54ac.tar.gz bugs-340c5f43bf00ad5723f8c91ee38c7893714c54ac.tar.bz2 bugs-340c5f43bf00ad5723f8c91ee38c7893714c54ac.tar.xz bugs-340c5f43bf00ad5723f8c91ee38c7893714c54ac.zip |
(no bug) Backout PR #60 - new feature not valid for stable branch (#164)
This was accidentally included in the 5.0.4 branch, which should have branched just before this commit. Everything else after it before we did end up branching would have been cherry-picked anyway.
-rw-r--r-- | Bugzilla/Hook.pm | 15 | ||||
-rw-r--r-- | Bugzilla/Template.pm | 1 | ||||
-rw-r--r-- | extensions/Example/Extension.pm | 13 |
3 files changed, 0 insertions, 29 deletions
diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm index d8ae67463..d6ba5e1d0 100644 --- a/Bugzilla/Hook.pm +++ b/Bugzilla/Hook.pm @@ -1479,21 +1479,6 @@ look at the code for C<create> in L<Bugzilla::Template>.) =back -=head2 template_after_create - -This hook allows you to manipulate the Template object before it is used. -You can use this to define new vmethods or filters in extensions. - -Params: - -=over - -=item C<template> - -This is the L<Bugzilla::Template> object. - -=back - =head2 template_before_process This hook is called any time Bugzilla processes a template file, including diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 7294e27c1..decffe1e8 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -1186,7 +1186,6 @@ sub create { Bugzilla::Hook::process('template_before_create', { config => $config }); my $template = $class->new($config) || die("Template creation failed: " . $class->error()); - Bugzilla::Hook::process('template_after_create', { template => $template }); # Pass on our current language to any template hooks or inner templates # called by this Template object. diff --git a/extensions/Example/Extension.pm b/extensions/Example/Extension.pm index c4fabe656..dbc84df72 100644 --- a/extensions/Example/Extension.pm +++ b/extensions/Example/Extension.pm @@ -920,19 +920,6 @@ sub template_before_create { $config->{VARIABLES}->{example_global_variable} = sub { return 'value' }; } -sub template_after_create { - my ( $self, $args ) = @_; - my $context = $args->{template}->context; - - # define a pluck method on template toolkit lists. - $context->define_vmethod( - list => pluck => sub { - my ( $list, $field ) = @_; - return [ map { $_->$field } @$list ]; - } - ); -} - sub template_before_process { my ($self, $args) = @_; |