mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
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:
parent
3f0dd9cb06
commit
7fd8f55141
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue