1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

- Optimise compiled template code.

- Improve template filter.

git-svn-id: file:///svn/phpbb/trunk@8685 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Marek A. R
2008-07-27 22:08:47 +00:00
parent 036dc071e7
commit 0c4ae1cd97
2 changed files with 67 additions and 49 deletions

View File

@@ -156,10 +156,15 @@ class template
}
}*/
$_tpldata = &$this->_tpldata;
$_rootref = &$this->_rootref;
$_lang = &$user->lang;
// These _are_ used the included files.
$_tpldata; $_rootref; $_lang;
if (($filename = $this->_tpl_load($handle)) !== false)
{
// $user _is_ used the included files.
$user;
($include_once) ? include_once($filename) : include($filename);
}
else if (($code = $this->_tpl_eval($handle)) !== false)
@@ -346,7 +351,7 @@ class template
{
unset($this->_tpldata[$blockname][($s_row_count - 1)]['S_LAST_ROW']);
}
// Add a new iteration to this block with the variable assignments we were given.
$this->_tpldata[$blockname][] = $vararray;
}
@@ -389,7 +394,7 @@ class template
// Nested blocks are not supported
return false;
}
// Change key to zero (change first position) if false and to last position if true
if ($key === false || $key === true)
{
@@ -478,10 +483,14 @@ class template
if ($include)
{
global $user;
// $user _is_ used the included files.
$user;
$_tpldata = &$this->_tpldata;
$_rootref = &$this->_rootref;
$_lang = &$user->lang;
// These _are_ used the included files.
$_tpldata; $_rootref; $_lang;
if ($filename)
{