diff options
author | Chris Smith <toonarmy@phpbb.com> | 2009-03-14 02:08:04 +0000 |
---|---|---|
committer | Chris Smith <toonarmy@phpbb.com> | 2009-03-14 02:08:04 +0000 |
commit | 228e69355917bc5eb1e31d59cd8366a40b971095 (patch) | |
tree | 42fa7a0a72bc765618afbad5d03c2cf9fa44ced5 /phpBB/includes | |
parent | 458e7946c9a05096fa4e6aa8144d80a1c2442502 (diff) | |
download | forums-228e69355917bc5eb1e31d59cd8366a40b971095.tar forums-228e69355917bc5eb1e31d59cd8366a40b971095.tar.gz forums-228e69355917bc5eb1e31d59cd8366a40b971095.tar.bz2 forums-228e69355917bc5eb1e31d59cd8366a40b971095.tar.xz forums-228e69355917bc5eb1e31d59cd8366a40b971095.zip |
Fix r9363, DEFINE uses template_compile::compile() which was generating really broken PHP :)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9368 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions_template.php | 3 |
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); |