diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2009-03-11 12:53:54 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-03-11 12:53:54 +0000 |
| commit | d9468c35da7df11ff12b0575b69ff97719cc3480 (patch) | |
| tree | b7efb20a867bef107563e1412423b9faafa212f0 /phpBB/includes/functions_template.php | |
| parent | 63ed82313764391db77f38e7e7bfe379280fdf4a (diff) | |
| download | forums-d9468c35da7df11ff12b0575b69ff97719cc3480.tar forums-d9468c35da7df11ff12b0575b69ff97719cc3480.tar.gz forums-d9468c35da7df11ff12b0575b69ff97719cc3480.tar.bz2 forums-d9468c35da7df11ff12b0575b69ff97719cc3480.tar.xz forums-d9468c35da7df11ff12b0575b69ff97719cc3480.zip | |
add IN_PHPBB check to generated cache files
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9363 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_template.php')
| -rw-r--r-- | phpBB/includes/functions_template.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php index 9f137d9151..925630e7ec 100644 --- a/phpBB/includes/functions_template.php +++ b/phpBB/includes/functions_template.php @@ -223,9 +223,13 @@ class template_compile // There will be a number of occasions where we switch into and out of // PHP mode instantaneously. Rather than "burden" the parser with this // we'll strip out such occurences, minimising such switching - $template_php = str_replace(' ?><?php ', ' ', $template_php); + if ($no_echo) + { + return "\$$echo_var .= '" . str_replace(' ?><?php ', ' ', $template_php) . "'"; + } - return (!$no_echo) ? $template_php : "\$$echo_var .= '" . $template_php . "'"; + $template_php = "<?php if (!defined('IN_PHPBB')) exit; ?>" . $template_php; + return str_replace(' ?><?php ', ' ', $template_php); } /** |
