aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/template.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2010-03-02 01:05:40 +0100
committerNils Adermann <naderman@naderman.de>2010-03-02 01:05:40 +0100
commitf0eb18fffd11a97383c8ccf2ae7d2838939f09e2 (patch)
tree70790196713789f9cbe4609f9e841f7e69bb6f00 /phpBB/includes/template.php
parent021c186be91095397d4e76801738373989360a52 (diff)
parentac5995551ba941b2cb5d98cc86ffe921bedee200 (diff)
downloadforums-f0eb18fffd11a97383c8ccf2ae7d2838939f09e2.tar
forums-f0eb18fffd11a97383c8ccf2ae7d2838939f09e2.tar.gz
forums-f0eb18fffd11a97383c8ccf2ae7d2838939f09e2.tar.bz2
forums-f0eb18fffd11a97383c8ccf2ae7d2838939f09e2.tar.xz
forums-f0eb18fffd11a97383c8ccf2ae7d2838939f09e2.zip
Merge commit 'release-3.0.6-RC2'
Diffstat (limited to 'phpBB/includes/template.php')
-rw-r--r--phpBB/includes/template.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
index 80434aca4c..648af61c00 100644
--- a/phpBB/includes/template.php
+++ b/phpBB/includes/template.php
@@ -90,7 +90,7 @@ class template
* Set custom template location (able to use directory outside of phpBB)
* @access public
*/
- function set_custom_template($template_path, $template_name)
+ function set_custom_template($template_path, $template_name, $template_mode = 'template')
{
global $phpbb_root_path, $user;
@@ -102,8 +102,13 @@ class template
$this->root = $template_path;
$this->cachepath = $phpbb_root_path . 'cache/ctpl_' . str_replace('_', '-', $template_name) . '_';
- $user->theme['template_storedb'] = false;
- $user->theme['template_inherits_id'] = false;
+
+ // As the template-engine is used for more than the template (emails, etc.), we should not set $user->theme in all cases, but only on the real template.
+ if ($template_mode == 'template')
+ {
+ $user->theme['template_storedb'] = false;
+ $user->theme['template_inherits_id'] = false;
+ }
$this->_rootref = &$this->_tpldata['.'][0];