aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2011-07-10 01:05:54 +0200
committerIgor Wiedler <igor@wiedler.ch>2011-07-10 01:05:54 +0200
commitc58b09e65d428b53d2e69abf00c5847829f18fc7 (patch)
tree7f2fb64bce1f71e90bd7ca43bd8752db4712254f /phpBB/includes
parentae53623230a45eeedf50cc3f6220164d8cd256c3 (diff)
downloadforums-c58b09e65d428b53d2e69abf00c5847829f18fc7.tar
forums-c58b09e65d428b53d2e69abf00c5847829f18fc7.tar.gz
forums-c58b09e65d428b53d2e69abf00c5847829f18fc7.tar.bz2
forums-c58b09e65d428b53d2e69abf00c5847829f18fc7.tar.xz
forums-c58b09e65d428b53d2e69abf00c5847829f18fc7.zip
[feature/template-engine] Remove $include_once argument of display()
PHPBB3-9726
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/template/template.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/phpBB/includes/template/template.php b/phpBB/includes/template/template.php
index 2c121d7247..c16eddc426 100644
--- a/phpBB/includes/template/template.php
+++ b/phpBB/includes/template/template.php
@@ -216,12 +216,11 @@ class phpbb_template
/**
* Display handle
* @param string $handle Handle to display
- * @param bool $include_once Allow multiple inclusions
* @return bool True on success, false on failure
*/
- public function display($handle, $include_once = true)
+ public function display($handle)
{
- $result = $this->call_hook($handle, $include_once);
+ $result = $this->call_hook($handle);
if ($result !== false)
{
return $result[0];
@@ -243,13 +242,12 @@ class phpbb_template
/**
* Calls hook if any is defined.
* @param string $handle Template handle being displayed.
- * @param bool $include_once Allow multiple inclusions
*/
- private function call_hook($handle, $include_once)
+ private function call_hook($handle)
{
global $phpbb_hook;
- if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array(__CLASS__, __FUNCTION__), $handle, $include_once, $this))
+ if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array(__CLASS__, __FUNCTION__), $handle, $this))
{
if ($phpbb_hook->hook_return(array(__CLASS__, __FUNCTION__)))
{
@@ -285,13 +283,12 @@ class phpbb_template
* @param string $handle Handle to operate on
* @param string $template_var Template variable to assign compiled handle to
* @param bool $return_content If true return compiled handle, otherwise assign to $template_var
- * @param bool $include_once Allow multiple inclusions of the file
* @return bool|string false on failure, otherwise if $return_content is true return string of the compiled handle, otherwise return true
*/
- public function assign_display($handle, $template_var = '', $return_content = true, $include_once = false)
+ public function assign_display($handle, $template_var = '', $return_content = true)
{
ob_start();
- $result = $this->display($handle, $include_once);
+ $result = $this->display($handle);
$contents = ob_get_clean();
if ($result === false)
{