From 147f2fc9d9341e99dc17c3a267b80b7fc22a9699 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Mon, 10 Apr 2017 21:53:51 -0400 Subject: Revert "Bug 1352913 - Extensions must register for template_before_process()" This reverts commit ecbdca8c3f06dd420db6a960c8808615dae6848a. --- Bugzilla/Template/Context.pm | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) (limited to 'Bugzilla/Template') diff --git a/Bugzilla/Template/Context.pm b/Bugzilla/Template/Context.pm index e78cd9806..b81e32130 100644 --- a/Bugzilla/Template/Context.pm +++ b/Bugzilla/Template/Context.pm @@ -69,24 +69,13 @@ sub stash { # template object for Throw*Error). # # Checking Bugzilla::Hook::in prevents infinite recursion on this hook. - - if ( $self->{bz_in_process} - and $name =~ /\./ - and !grep( $_ eq $name, @$pre_process ) - and !Bugzilla::Hook::in('template_before_process') ) + if ($self->{bz_in_process} and $name =~ /\./ + and !grep($_ eq $name, @$pre_process) + and !Bugzilla::Hook::in('template_before_process')) { - state $WANT = Bugzilla::Hook::collect_wants('template_before_process_wants'); - if ( $WANT->{$name} ) { - my @extensions = grep { $WANT->{$name}{ blessed $_ } } @{ Bugzilla->extensions }; - Bugzilla::Hook::process( - "template_before_process" => { - vars => $stash, - context => $self, - file => $name - }, - \@extensions - ) if @extensions; - } + Bugzilla::Hook::process("template_before_process", + { vars => $stash, context => $self, + file => $name }); } # This prevents other calls to stash() that might somehow happen -- cgit v1.2.3-24-g4f1b