diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-06-20 03:28:50 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-06-28 22:41:58 +0200 |
commit | e1b48df3b5cdd81920782a8585864af3b294e919 (patch) | |
tree | 13bb7c184950b6f1d911e387bbff817e42d1ee2d /Bugzilla.pm | |
parent | 561a205df8fdb1950df167c6915d52601630c08a (diff) | |
download | bugzilla-e1b48df3b5cdd81920782a8585864af3b294e919.tar.gz bugzilla-e1b48df3b5cdd81920782a8585864af3b294e919.tar.xz |
lots of hacking
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r-- | Bugzilla.pm | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm index 858fa6f44..4fbcd533e 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -193,8 +193,17 @@ sub init_page { # Subroutines and Methods ##################################################################### +my $preload_templates = 0; +sub preload_templates { + $preload_templates = 1; + + delete request_cache->{template}; + template(); + return 1; +} + sub template { - request_cache->{template} //= Bugzilla::Template->create(); + request_cache->{template} //= Bugzilla::Template->create(preload => $preload_templates); request_cache->{template}->{_is_main} = 1; return request_cache->{template}; @@ -205,7 +214,8 @@ sub template_inner { my $cache = request_cache; my $current_lang = $cache->{template_current_lang}->[0]; $lang ||= $current_lang || ''; - return $cache->{"template_inner_$lang"} ||= Bugzilla::Template->create(language => $lang); + my %options = (language => $lang, preload => $preload_templates); + return $cache->{"template_inner_$lang"} ||= Bugzilla::Template->create(%options); } sub extensions { |