diff options
author | mkanat%bugzilla.org <> | 2009-12-17 06:27:10 +0100 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-12-17 06:27:10 +0100 |
commit | 9d6f961beaecf07741c2221146ed2c17e9c07594 (patch) | |
tree | bce3b8939f7092176f173e0da770e31c7784632c /extensions | |
parent | 4f2eccc20de8b4ba8df9030ce07c836d2bae515b (diff) | |
download | bugzilla-9d6f961beaecf07741c2221146ed2c17e9c07594.tar.gz bugzilla-9d6f961beaecf07741c2221146ed2c17e9c07594.tar.xz |
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 <mkanat@bugzilla.org> r=dkl, a=mkanat
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/Example/Extension.pm | 10 |
1 files changed, 4 insertions, 6 deletions
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; } } |