mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02: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:
@@ -68,11 +68,15 @@ class phpbb_template_context
|
|||||||
|
|
||||||
public function get_data_ref()
|
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()
|
public function get_root_ref()
|
||||||
{
|
{
|
||||||
|
// rootref is already a reference
|
||||||
return $this->rootref;
|
return $this->rootref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -50,7 +50,7 @@ class phpbb_template_renderer_eval implements phpbb_template_renderer
|
|||||||
*/
|
*/
|
||||||
public function render($context, $lang)
|
public function render($context, $lang)
|
||||||
{
|
{
|
||||||
$_template = &$this->template;
|
$_template = $this->template;
|
||||||
$_tpldata = &$context->get_data_ref();
|
$_tpldata = &$context->get_data_ref();
|
||||||
$_rootref = &$context->get_root_ref();
|
$_rootref = &$context->get_root_ref();
|
||||||
$_lang = &$lang;
|
$_lang = &$lang;
|
||||||
|
@@ -50,7 +50,7 @@ class phpbb_template_renderer_include implements phpbb_template_renderer
|
|||||||
*/
|
*/
|
||||||
public function render($context, $lang)
|
public function render($context, $lang)
|
||||||
{
|
{
|
||||||
$_template = &$this->template;
|
$_template = $this->template;
|
||||||
$_tpldata = &$context->get_data_ref();
|
$_tpldata = &$context->get_data_ref();
|
||||||
$_rootref = &$context->get_root_ref();
|
$_rootref = &$context->get_root_ref();
|
||||||
$_lang = &$lang;
|
$_lang = &$lang;
|
||||||
|
Reference in New Issue
Block a user