From 9d6f961beaecf07741c2221146ed2c17e9c07594 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Thu, 17 Dec 2009 05:27:10 +0000 Subject: Bug 525606: Make the template_before_process hook run whenever a template is loaded (including PROCESS and INCLUDE), not just when $template->process is called. Patch by Max Kanat-Alexander r=dkl, a=mkanat --- extensions/Example/Extension.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'extensions/Example/Extension.pm') diff --git a/extensions/Example/Extension.pm b/extensions/Example/Extension.pm index 615f7740b..c0e44aa59 100644 --- a/extensions/Example/Extension.pm +++ b/extensions/Example/Extension.pm @@ -448,12 +448,10 @@ sub template_before_create { sub template_before_process { my ($self, $args) = @_; - my ($vars, $file, $template) = @$args{qw(vars file template)}; - - $vars->{'example'} = 1; - - if ($file =~ m{^bug/show}) { - $vars->{'showing_a_bug'} = 1; + my ($vars, $file, $context) = @$args{qw(vars file context)}; + + if ($file eq 'bug/edit.html.tmpl') { + $vars->{'viewing_the_bug_form'} = 1; } } -- cgit v1.2.3-24-g4f1b