diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2006-05-25 19:15:04 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-05-25 19:15:04 +0000 |
| commit | fec41273a4ae2f24ec8beb11dc473222cfd04b53 (patch) | |
| tree | 9ba645f3829d1391c1b18904b813c16519f00beb /phpBB/includes/template.php | |
| parent | a59f59de21aa0abc311cd4601939c08259413d95 (diff) | |
| download | forums-fec41273a4ae2f24ec8beb11dc473222cfd04b53.tar forums-fec41273a4ae2f24ec8beb11dc473222cfd04b53.tar.gz forums-fec41273a4ae2f24ec8beb11dc473222cfd04b53.tar.bz2 forums-fec41273a4ae2f24ec8beb11dc473222cfd04b53.tar.xz forums-fec41273a4ae2f24ec8beb11dc473222cfd04b53.zip | |
first round of custom profile changes
git-svn-id: file:///svn/phpbb/trunk@5965 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/template.php')
| -rw-r--r-- | phpBB/includes/template.php | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 9ba7086913..d8f78a77c1 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -106,6 +106,36 @@ class template } /** + * Reset/empty complete block + * @public + */ + function destroy_block_vars($blockname) + { + if (strpos($blockname, '.') !== false) + { + // Nested block. + $blocks = explode('.', $blockname); + $blockcount = sizeof($blocks) - 1; + + $str = &$this->_tpldata; + for ($i = 0; $i < $blockcount; $i++) + { + $str = &$str[$blocks[$i]]; + $str = &$str[sizeof($str) - 1]; + } + + unset($str[$blocks[$blockcount]]); + } + else + { + // Top-level block. + unset($this->_tpldata[$blockname]); + } + + return true; + } + + /** * Display handle * @public */ @@ -334,36 +364,6 @@ class template } /** - * Reset/empty complete block - * @public - */ - function reset_block_vars($blockname) - { - if (strpos($blockname, '.') !== false) - { - // Nested block. - $blocks = explode('.', $blockname); - $blockcount = sizeof($blocks) - 1; - - $str = &$this->_tpldata; - for ($i = 0; $i < $blockcount; $i++) - { - $str = &$str[$blocks[$i]]; - $str = &$str[sizeof($str) - 1]; - } - - unset($str[$blocks[$blockcount]]); - } - else - { - // Top-level block. - unset($this->_tpldata[$blockname]); - } - - return true; - } - - /** * Change already assigned key variable pair (one-dimensional - single loop entry) * * Some Examples: |
