mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/template-engine] Fixed reference usage.
Hopefully this is right, I have not checked it against the manual (assuming the manual even covers these things). PHPBB3-9726
This commit is contained in:
parent
169c4377e9
commit
635460fa6d
3 changed files with 7 additions and 3 deletions
|
@ -68,11 +68,15 @@ class phpbb_template_context
|
|||
|
||||
public function get_data_ref()
|
||||
{
|
||||
return $this->tpldata;
|
||||
// returning a reference directly is not
|
||||
// something php is capable of doing
|
||||
$ref = &$this->tpldata;
|
||||
return $ref;
|
||||
}
|
||||
|
||||
public function get_root_ref()
|
||||
{
|
||||
// rootref is already a reference
|
||||
return $this->rootref;
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ class phpbb_template_renderer_eval implements phpbb_template_renderer
|
|||
*/
|
||||
public function render($context, $lang)
|
||||
{
|
||||
$_template = &$this->template;
|
||||
$_template = $this->template;
|
||||
$_tpldata = &$context->get_data_ref();
|
||||
$_rootref = &$context->get_root_ref();
|
||||
$_lang = &$lang;
|
||||
|
|
|
@ -50,7 +50,7 @@ class phpbb_template_renderer_include implements phpbb_template_renderer
|
|||
*/
|
||||
public function render($context, $lang)
|
||||
{
|
||||
$_template = &$this->template;
|
||||
$_template = $this->template;
|
||||
$_tpldata = &$context->get_data_ref();
|
||||
$_rootref = &$context->get_root_ref();
|
||||
$_lang = &$lang;
|
||||
|
|
Loading…
Add table
Reference in a new issue