summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-12-17 06:27:10 +0100
committermkanat%bugzilla.org <>2009-12-17 06:27:10 +0100
commit9d6f961beaecf07741c2221146ed2c17e9c07594 (patch)
treebce3b8939f7092176f173e0da770e31c7784632c /extensions
parent4f2eccc20de8b4ba8df9030ce07c836d2bae515b (diff)
downloadbugzilla-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.pm10
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;
}
}