mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-10 18:54:08 +02:00
[feature/controller] Implement a front controller
PHPBB3-10864
This commit is contained in:
@@ -224,15 +224,9 @@ class phpbb_template
|
||||
*/
|
||||
public function assign_display($handle, $template_var = '', $return_content = true)
|
||||
{
|
||||
ob_start();
|
||||
$result = $this->display($handle);
|
||||
$contents = ob_get_clean();
|
||||
if ($result === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$contents = $this->return_display($handle);
|
||||
|
||||
if ($return_content)
|
||||
if ($return_content === true || empty($template_var) || $contents === false)
|
||||
{
|
||||
return $contents;
|
||||
}
|
||||
@@ -242,6 +236,15 @@ class phpbb_template
|
||||
return true;
|
||||
}
|
||||
|
||||
public function return_display($handle)
|
||||
{
|
||||
ob_start();
|
||||
$result = $this->display($handle);
|
||||
$contents = ob_get_clean();
|
||||
|
||||
return $result === false ? $result : $contents;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtains a template renderer for a template identified by specified
|
||||
* handle. The template renderer can display the template later.
|
||||
|
Reference in New Issue
Block a user