aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_template.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php
index 925630e7ec..46c7cedc01 100644
--- a/phpBB/includes/functions_template.php
+++ b/phpBB/includes/functions_template.php
@@ -228,7 +228,6 @@ class template_compile
return "\$$echo_var .= '" . str_replace(' ?><?php ', ' ', $template_php) . "'";
}
- $template_php = "<?php if (!defined('IN_PHPBB')) exit; ?>" . $template_php;
return str_replace(' ?><?php ', ' ', $template_php);
}
@@ -752,6 +751,8 @@ class template_compile
$filename = $this->template->cachepath . str_replace('/', '.', $this->template->filename[$handle]) . '.' . $phpEx;
+ $data = "<?php if (!defined('IN_PHPBB')) exit;" . ((strpos($data, '<?php') === 0) ? substr($data, 5) : ' ?>' . $data);
+
if ($fp = @fopen($filename, 'wb'))
{
@flock($fp, LOCK_EX);