aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/template.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
index 274fffb1d7..74790c6e96 100644
--- a/phpBB/includes/template.php
+++ b/phpBB/includes/template.php
@@ -174,7 +174,7 @@ class Template {
if (!$this->compile_load($_str, $handle, true))
{
- global $user;
+ global $user, $phpEx;
if (!$this->loadfile($handle))
{
@@ -231,9 +231,9 @@ class Template {
$this->files[$handle] = $this->make_filename($filename);
$_str = '';
- if (!($this->compile_load($_str, $handle, false)))
+ if (!($this->compile_load($_str, $handle, true)))
{
- global $user;
+ global $user, $phpEx;
if (!$this->loadfile($handle))
{
@@ -243,7 +243,7 @@ class Template {
$this->compiled_code[$handle] = $this->compile($this->uncompiled_code[$handle]);
$this->compile_write($handle, $this->compiled_code[$handle]);
- return $handle;
+ eval($this->compiled_code[$handle]);
}
}
@@ -372,8 +372,7 @@ class Template {
case 'INCLUDE':
$temp = '';
list(, $temp) = each($include_blocks);
- $compile_blocks[] = "// INCLUDE $temp\ninclude('" . $this->cachedir . $temp . ".' . \$phpEx);\n";
- $this->assign_from_include($temp);
+ $compile_blocks[] = "// INCLUDE $temp\n\$this->assign_from_include('" . $temp . "');\n";
break;
/* case 'INCLUDEPHP':
$compile_blocks[] = '// INCLUDEPHP ' . $blocks[2][$curr_tb] . "\n" . $this->compile_tag_include_php($blocks[2][$curr_tb]);
@@ -700,6 +699,7 @@ class Template {
if (file_exists($filename) && @filemtime($filename) >= @filemtime($this->files[$handle]))
{
$_str = '';
+
include($filename);
if ($do_echo && $_str != '')