From 78be753e3be38903b0eeb81e36a7c51704bc6cf3 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Sun, 28 Feb 2010 17:33:29 -0800 Subject: Bug 508823: Make it so that you don't ever have to reset template_inner (like Bugzilla->template_inner("")). r=LpSolit, a=LpSolit --- Bugzilla/Template/Plugin/Hook.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Bugzilla/Template') diff --git a/Bugzilla/Template/Plugin/Hook.pm b/Bugzilla/Template/Plugin/Hook.pm index 1370f58e0..f2434817c 100644 --- a/Bugzilla/Template/Plugin/Hook.pm +++ b/Bugzilla/Template/Plugin/Hook.pm @@ -62,7 +62,7 @@ sub process { # Get the hooks out of the cache if they exist. Otherwise, read them # from the disk. my $cache = Bugzilla->request_cache->{template_plugin_hook_cache} ||= {}; - my $lang = Bugzilla->request_cache->{language} || ''; + my $lang = $context->{bz_language} || ''; $cache->{"${lang}__$extension_template"} ||= $self->_get_hooks($extension_template); @@ -75,7 +75,7 @@ sub process { sub _get_hooks { my ($self, $extension_template) = @_; - my $template_sets = _template_hook_include_path(); + my $template_sets = $self->_template_hook_include_path(); my @hooks; foreach my $dir_set (@$template_sets) { foreach my $template_dir (@$dir_set) { @@ -93,8 +93,9 @@ sub _get_hooks { } sub _template_hook_include_path { + my $self = shift; my $cache = Bugzilla->request_cache; - my $language = $cache->{language} || ''; + my $language = $self->_context->{bz_language} || ''; my $cache_key = "template_plugin_hook_include_path_$language"; $cache->{$cache_key} ||= template_include_path({ language => $language, -- cgit v1.2.3-24-g4f1b