From 64ca49bee0526a2fd20ade6e236275b7054d59a8 Mon Sep 17 00:00:00 2001 From: taggon Date: Tue, 11 Oct 2011 01:12:29 +0000 Subject: [PATCH] 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 --- classes/template/TemplateHandler.class.php | 4 ++-- tests/classes/template/TemplateHandlerTest.class.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index fa48f192a..e7bbcf1d9 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -417,7 +417,7 @@ if(!$fileDir) return ''; - return "compile('{$fileDir}','{$pathinfo['basename']}') ?>"; + return "compile('{$fileDir}','{$pathinfo['basename']}') ?>"; // case 'load_js_plugin': @@ -451,7 +451,7 @@ if($pathinfo['basename'] == 'lang.xml' && substr($pathinfo['dirname'],-5) == '/lang') { $result = "Context::loadLang('{$relativeDir}');"; } 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; case 'js': diff --git a/tests/classes/template/TemplateHandlerTest.class.php b/tests/classes/template/TemplateHandlerTest.class.php index 0497468cd..4a3bff8bc 100644 --- a/tests/classes/template/TemplateHandlerTest.class.php +++ b/tests/classes/template/TemplateHandlerTest.class.php @@ -102,12 +102,12 @@ class TemplateHandlerTest extends PHPUnit_Framework_TestCase // #include array( '
This is another dummy
', - 'compile(\'tests/classes/template\',\'sample.html\') ?>
This is another dummy
' + 'compile(\'tests/classes/template\',\'sample.html\') ?>
This is another dummy
' ), // array( '
This is another dummy
', - 'compile(\'tests/classes\',\'sample.html\') ?>
This is another dummy
' + 'compile(\'tests/classes\',\'sample.html\') ?>
This is another dummy
' ), // array( @@ -127,7 +127,7 @@ class TemplateHandlerTest extends PHPUnit_Framework_TestCase // array( '', - 'compile(); ?>' + 'compile(); ?>' ), // array(