aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/template_executor_eval.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/template_executor_eval.php')
-rw-r--r--phpBB/includes/template_executor_eval.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/phpBB/includes/template_executor_eval.php b/phpBB/includes/template_executor_eval.php
index 27bdf95b52..af7d68fef3 100644
--- a/phpBB/includes/template_executor_eval.php
+++ b/phpBB/includes/template_executor_eval.php
@@ -13,20 +13,30 @@ class phpbb_template_executor_eval implements phpbb_template_executor
/**
* Constructor. Stores provided code for future evaluation.
+ * Template includes are delegated to template object $template.
*
* @param string $code php code of the template
+ * @param phpbb_template $template template object
*/
- public function __construct($code)
+ public function __construct($code, $template)
{
$this->code = $code;
+ $this->template = $template;
}
/**
* Executes the template managed by this executor by eval'ing php code
* of the template.
+ * @param phpbb_template_context $context Template context to use
+ * @param array $lang Language entries to use
*/
- public function execute()
+ public function execute($context, $lang)
{
+ $_template = &$this->template;
+ $_tpldata = &$context->get_data_ref();
+ $_rootref = &$context->get_root_ref();
+ $_lang = &$lang;
+
eval($this->code);
}
}