diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2009-07-24 08:47:10 +0000 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2009-07-24 08:47:10 +0000 |
commit | 89332c00b7198b5bd07fdb98b21d4734c300da15 (patch) | |
tree | 9caccb039eeb0c95016792e56fe45614f15e7567 /phpBB/includes/template.php | |
parent | 83ee6bb50504209ef2072773bdd958f9cbe24539 (diff) | |
download | forums-89332c00b7198b5bd07fdb98b21d4734c300da15.tar forums-89332c00b7198b5bd07fdb98b21d4734c300da15.tar.gz forums-89332c00b7198b5bd07fdb98b21d4734c300da15.tar.bz2 forums-89332c00b7198b5bd07fdb98b21d4734c300da15.tar.xz forums-89332c00b7198b5bd07fdb98b21d4734c300da15.zip |
Fix Bug #40515 - Fix set_custom_template for database-stored styles
Authorised by: AcydBurn
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9839 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/template.php')
-rw-r--r-- | phpBB/includes/template.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 7cf865072f..fa7cf437fd 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -39,6 +39,8 @@ class template var $files_inherit = array(); var $files_template = array(); var $inherit_root = ''; + var $orig_tpl_storedb = 'undefined'; + var $orig_tpl_inherits_id = 'undefined'; // this will hash handle names to the compiled/uncompiled code for that handle. var $compiled_code = array(); @@ -55,6 +57,16 @@ class template { $this->root = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template'; $this->cachepath = $phpbb_root_path . 'cache/tpl_' . str_replace('_', '-', $user->theme['template_path']) . '_'; + if ($this->orig_tpl_storedb == 'undefined') + { + $this->orig_tpl_storedb = $user->theme['template_storedb']; + } + if ($this->orig_tpl_inherits_id == 'undefined') + { + $this->orig_tpl_inherits_id = $user->theme['template_inherits_id']; + } + $user->theme['template_storedb'] = $this->orig_tpl_storedb; + $user->theme['template_inherits_id'] = $this->orig_tpl_inherits_id; if ($user->theme['template_inherits_id']) { @@ -77,10 +89,12 @@ class template */ function set_custom_template($template_path, $template_name) { - global $phpbb_root_path; + global $phpbb_root_path, $user; $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; $this->_rootref = &$this->_tpldata['.'][0]; |