summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authorbyron jones <byron@glob.com.au>2018-03-12 21:01:31 +0100
committerDylan William Hardison <dylan@hardison.net>2018-03-12 21:01:31 +0100
commit7ff0b7a72050104bba80a30c00c31c3f44fffa9e (patch)
tree7f9305e67dbb49bd24c09a01f983f72ed3b31ef0 /Bugzilla/Template.pm
parent5ee20b480b45ff9c66b7de3e957f7d0b6ed19ddb (diff)
downloadbugzilla-7ff0b7a72050104bba80a30c00c31c3f44fffa9e.tar.gz
bugzilla-7ff0b7a72050104bba80a30c00c31c3f44fffa9e.tar.xz
Bug 1439993 - Remove COMPILE_DIR => setting from Bugzilla::Template
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index d27896532..3c2663e74 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -572,7 +572,9 @@ sub create {
ABSOLUTE => 1,
RELATIVE => $ENV{MOD_PERL} ? 0 : 1,
- COMPILE_DIR => bz_locations()->{'template_cache'},
+ # Only use an on-disk template cache if we're running as the web
+ # server. This ensures the permissions of the cache remain correct.
+ COMPILE_DIR => is_webserver_group() ? bz_locations()->{'template_cache'} : undef,
# Don't check for a template update until 1 hour has passed since the
# last check.