mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-30 08:39:58 +09:00
Fixed a template bug in PHP4
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9549 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
98d168abc4
commit
64ca49bee0
2 changed files with 5 additions and 5 deletions
|
|
@ -417,7 +417,7 @@
|
||||||
|
|
||||||
if(!$fileDir) return '';
|
if(!$fileDir) return '';
|
||||||
|
|
||||||
return "<?php echo TemplateHandler::getInstance()->compile('{$fileDir}','{$pathinfo['basename']}') ?>";
|
return "<?php \$__tpl=TemplateHandler::getInstance();echo \$__tpl->compile('{$fileDir}','{$pathinfo['basename']}') ?>";
|
||||||
|
|
||||||
// <!--%load_js_plugin-->
|
// <!--%load_js_plugin-->
|
||||||
case 'load_js_plugin':
|
case 'load_js_plugin':
|
||||||
|
|
@ -451,7 +451,7 @@
|
||||||
if($pathinfo['basename'] == 'lang.xml' && substr($pathinfo['dirname'],-5) == '/lang') {
|
if($pathinfo['basename'] == 'lang.xml' && substr($pathinfo['dirname'],-5) == '/lang') {
|
||||||
$result = "Context::loadLang('{$relativeDir}');";
|
$result = "Context::loadLang('{$relativeDir}');";
|
||||||
} else {
|
} else {
|
||||||
$result = "require_once('./classes/xml/XmlJsFilter.class.php');\$__xmlFilter = new XmlJsFilter('{$relativeDir}','{$pathinfo['basename']}');\$__xmlFilter->compile();";
|
$result = "require_once('./classes/xml/XmlJsFilter.class.php');\$__xmlFilter=new XmlJsFilter('{$relativeDir}','{$pathinfo['basename']}');\$__xmlFilter->compile();";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'js':
|
case 'js':
|
||||||
|
|
|
||||||
|
|
@ -102,12 +102,12 @@ class TemplateHandlerTest extends PHPUnit_Framework_TestCase
|
||||||
// #include
|
// #include
|
||||||
array(
|
array(
|
||||||
'<dummy /><!--#include("sample.html")--><div>This is another dummy</div>',
|
'<dummy /><!--#include("sample.html")--><div>This is another dummy</div>',
|
||||||
'<dummy /><?php echo TemplateHandler::getInstance()->compile(\'tests/classes/template\',\'sample.html\') ?><div>This is another dummy</div>'
|
'<dummy /><?php $__tpl=TemplateHandler::getInstance();echo $__tpl->compile(\'tests/classes/template\',\'sample.html\') ?><div>This is another dummy</div>'
|
||||||
),
|
),
|
||||||
// <include target="file">
|
// <include target="file">
|
||||||
array(
|
array(
|
||||||
'<dummy /><include target="../sample.html" /><div>This is another dummy</div>',
|
'<dummy /><include target="../sample.html" /><div>This is another dummy</div>',
|
||||||
'<dummy /><?php echo TemplateHandler::getInstance()->compile(\'tests/classes\',\'sample.html\') ?><div>This is another dummy</div>'
|
'<dummy /><?php $__tpl=TemplateHandler::getInstance();echo $__tpl->compile(\'tests/classes\',\'sample.html\') ?><div>This is another dummy</div>'
|
||||||
),
|
),
|
||||||
// <load target="../../../modules/page/lang/lang.xml">
|
// <load target="../../../modules/page/lang/lang.xml">
|
||||||
array(
|
array(
|
||||||
|
|
@ -127,7 +127,7 @@ class TemplateHandlerTest extends PHPUnit_Framework_TestCase
|
||||||
// <!--%import("../../../modules/page/tpl/filter/insert_config.xml")-->
|
// <!--%import("../../../modules/page/tpl/filter/insert_config.xml")-->
|
||||||
array(
|
array(
|
||||||
'<dummy /><!--%import("../../../modules/page/tpl/filter/insert_config.xml")--><dummy />',
|
'<dummy /><!--%import("../../../modules/page/tpl/filter/insert_config.xml")--><dummy />',
|
||||||
'<dummy /><?php require_once(\'./classes/xml/XmlJsFilter.class.php\');$__xmlFilter = new XmlJsFilter(\'modules/page/tpl/filter\',\'insert_config.xml\');$__xmlFilter->compile(); ?><dummy />'
|
'<dummy /><?php require_once(\'./classes/xml/XmlJsFilter.class.php\');$__xmlFilter=new XmlJsFilter(\'modules/page/tpl/filter\',\'insert_config.xml\');$__xmlFilter->compile(); ?><dummy />'
|
||||||
),
|
),
|
||||||
// <!--%import("../script.js",type="body")-->
|
// <!--%import("../script.js",type="body")-->
|
||||||
array(
|
array(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue