mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 12:03:21 +01:00
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
This commit is contained in:
parent
458e7946c9
commit
228e693559
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user