mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
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
This commit is contained in:
parent
83ee6bb505
commit
89332c00b7
2 changed files with 16 additions and 1 deletions
|
@ -170,6 +170,7 @@
|
||||||
<li>[Fix] Copy poll options properly when copying topic. (Bug #39065)</li>
|
<li>[Fix] Copy poll options properly when copying topic. (Bug #39065)</li>
|
||||||
<li>[Fix] Preserve newlines in template files (one newline had been always dropped after a template variable due to PHP's handling of closing tags)</li>
|
<li>[Fix] Preserve newlines in template files (one newline had been always dropped after a template variable due to PHP's handling of closing tags)</li>
|
||||||
<li>[Fix] Be less strict with FTP daemons when getting directory filelists. (Bug #46295)</li>
|
<li>[Fix] Be less strict with FTP daemons when getting directory filelists. (Bug #46295)</li>
|
||||||
|
<li>[Fix] Fix set_custom_template for database-stored styles (Bug #40515 - Patch by nickvergessen)</li>
|
||||||
<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
|
<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
|
||||||
<li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li>
|
<li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li>
|
||||||
<li>[Change] Template engine now permits to a limited extent variable includes.</li>
|
<li>[Change] Template engine now permits to a limited extent variable includes.</li>
|
||||||
|
|
|
@ -39,6 +39,8 @@ class template
|
||||||
var $files_inherit = array();
|
var $files_inherit = array();
|
||||||
var $files_template = array();
|
var $files_template = array();
|
||||||
var $inherit_root = '';
|
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.
|
// this will hash handle names to the compiled/uncompiled code for that handle.
|
||||||
var $compiled_code = array();
|
var $compiled_code = array();
|
||||||
|
@ -55,6 +57,16 @@ class template
|
||||||
{
|
{
|
||||||
$this->root = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/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']) . '_';
|
$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'])
|
if ($user->theme['template_inherits_id'])
|
||||||
{
|
{
|
||||||
|
@ -77,10 +89,12 @@ class template
|
||||||
*/
|
*/
|
||||||
function set_custom_template($template_path, $template_name)
|
function set_custom_template($template_path, $template_name)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path;
|
global $phpbb_root_path, $user;
|
||||||
|
|
||||||
$this->root = $template_path;
|
$this->root = $template_path;
|
||||||
$this->cachepath = $phpbb_root_path . 'cache/ctpl_' . str_replace('_', '-', $template_name) . '_';
|
$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];
|
$this->_rootref = &$this->_tpldata['.'][0];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue