diff options
| author | Marek A. R <aptx@phpbb.com> | 2008-07-27 22:08:47 +0000 |
|---|---|---|
| committer | Marek A. R <aptx@phpbb.com> | 2008-07-27 22:08:47 +0000 |
| commit | 0c4ae1cd979bce92793c733b1d39ed83af79b52c (patch) | |
| tree | e48edc6bd7fb6c45d5ea3ffc6900da01cd5eb003 /phpBB/includes/template.php | |
| parent | 036dc071e7b564a9f8d959bc2b4cc95c6a79e002 (diff) | |
| download | forums-0c4ae1cd979bce92793c733b1d39ed83af79b52c.tar forums-0c4ae1cd979bce92793c733b1d39ed83af79b52c.tar.gz forums-0c4ae1cd979bce92793c733b1d39ed83af79b52c.tar.bz2 forums-0c4ae1cd979bce92793c733b1d39ed83af79b52c.tar.xz forums-0c4ae1cd979bce92793c733b1d39ed83af79b52c.zip | |
- Optimise compiled template code.
- Improve template filter.
git-svn-id: file:///svn/phpbb/trunk@8685 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/template.php')
| -rw-r--r-- | phpBB/includes/template.php | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 01de64d4c4..9e0ff6c02a 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -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) { |
