Remove meaningless PHP script open and close syntax.

?><?php would not appear on the template cache files.
 remove __DEBUG__ only syntaxes (as it is use less)

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10775 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
misol 2012-06-16 01:58:18 +00:00
parent 3f0dd9cb06
commit 7fd8f55141

View file

@ -204,6 +204,9 @@ class TemplateHandler {
// prevent from calling directly before writing into file
$buff = '<?php if(!defined("__XE__"))exit;?>'.$buff;
// remove php script reopening
$buff = preg_replace(array('/(\n|\r\n)+/','/(;)?( )*\?\>([\n\t ]+)?\<\?php([\n\t ]+)?/'),array("\n",";\n"),$buff);
return $buff;
}
@ -532,7 +535,7 @@ class TemplateHandler {
}
$result = "<?php {$result} ?>";
if($metafile) $result = "<!--#Meta:{$metafile}-->".$result;
if(__DEBUG__) if($metafile) $result = "<!--#Meta:{$metafile}-->".$result;
return $result;
}