summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-03-01 02:33:29 +0100
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-03-01 02:33:29 +0100
commit78be753e3be38903b0eeb81e36a7c51704bc6cf3 (patch)
tree295e7a99a07ed742872570d1ecf72f4312978109 /Bugzilla/Template
parent5080ecd2f4c2711b228127e1c12647906d37f3bd (diff)
downloadbugzilla-78be753e3be38903b0eeb81e36a7c51704bc6cf3.tar.gz
bugzilla-78be753e3be38903b0eeb81e36a7c51704bc6cf3.tar.xz
Bug 508823: Make it so that you don't ever have to reset template_inner (like
Bugzilla->template_inner("")). r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla/Template')
-rw-r--r--Bugzilla/Template/Plugin/Hook.pm7
1 files changed, 4 insertions, 3 deletions
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,