From 697fd5a134bde47006f57b6dd8df4e2dec6a7f3d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 16 Sep 2009 08:11:52 +0000 Subject: Fix #51285 and more issues with template inherence on set_custom_template Conflict introduced with r9839 and r9823 Authorised by: AcydBurn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10150 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/template.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/template.php') 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]; -- cgit v1.2.1