this should eliminate most problems with statements not interpreted but valid. We really do not use/need multiline conditionals. ;)

git-svn-id: file:///svn/phpbb/trunk@5053 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2005-01-10 07:14:02 +00:00
parent 3de2acb3df
commit 04f91c3ee2

View file

@ -440,9 +440,10 @@ class template
$includephp_blocks = $matches[1]; $includephp_blocks = $matches[1];
$code = preg_replace('#<!-- INCLUDEPHP ([a-zA-Z0-9\_\-\+\.]+?) -->#', '<!-- INCLUDEPHP -->', $code); $code = preg_replace('#<!-- INCLUDEPHP ([a-zA-Z0-9\_\-\+\.]+?) -->#', '<!-- INCLUDEPHP -->', $code);
preg_match_all('#<!-- (.*?) (.*?)?[ ]?-->#s', $code, $blocks); preg_match_all('#<!-- (.*?) (.*?)?[ ]?-->#', $code, $blocks);
$text_blocks = preg_split('#<!-- (.*?) (.*?)?[ ]?-->#s', $code); $text_blocks = preg_split('#<!-- (.*?) (.*?)?[ ]?-->#', $code);
for($i = 0; $i < count($text_blocks); $i++)
for ($i = 0, $j = sizeof($text_blocks); $i < $j; $i++)
{ {
$this->compile_var_tags($text_blocks[$i]); $this->compile_var_tags($text_blocks[$i]);
} }