diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-07-23 17:25:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-23 17:25:43 +0200 |
commit | 345e686485e484e087ea58c988e4831209c39554 (patch) | |
tree | 6888ff14ec3d34cfe21d64d520421ba94918a25b /Bugzilla/Template.pm | |
parent | e8c0dfe232ce1efe78f8dd7cf6b78c24b96786e8 (diff) | |
download | bugzilla-345e686485e484e087ea58c988e4831209c39554.tar.gz bugzilla-345e686485e484e087ea58c988e4831209c39554.tar.xz |
Bug 1476841 - Various code cleanups ahead of the Mojolicious patch
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r-- | Bugzilla/Template.pm | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 8cf91052e..299734d64 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -565,13 +565,8 @@ sub create { PRE_CHOMP => 1, TRIM => 1, - # Bugzilla::Template::Plugin::Hook uses the absolute (in mod_perl) - # or relative (in mod_cgi) paths of hook files to explicitly compile - # a specific file. Also, these paths may be absolute at any time - # if a packager has modified bz_locations() to contain absolute - # paths. ABSOLUTE => 1, - RELATIVE => $ENV{MOD_PERL} ? 0 : 1, + RELATIVE => 0, # Only use an on-disk template cache if we're running as the web # server. This ensures the permissions of the cache remain correct. @@ -584,7 +579,7 @@ sub create { # Initialize templates (f.e. by loading plugins like Hook). PRE_PROCESS => ["global/initialize.none.tmpl"], - ENCODING => Bugzilla->params->{'utf8'} ? 'UTF-8' : undef, + ENCODING => 'UTF-8', # Functions for processing text within templates in various ways. # IMPORTANT! When adding a filter here that does not override a @@ -1042,7 +1037,7 @@ sub create { # under mod_perl, use a provider (template loader) that preloads all templates into memory my $provider_class - = $ENV{MOD_PERL} + = $opts{preload} ? 'Bugzilla::Template::PreloadProvider' : 'Template::Provider'; |