From 024de701df1e4ee5f7cc4b5139a490bd9477aae9 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Wed, 12 Sep 2012 05:57:28 +0000 Subject: the XML to configure the template can now be written inside the config.xml file --- h-source/Application/Controllers/BaseController.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'h-source/Application/Controllers/BaseController.php') diff --git a/h-source/Application/Controllers/BaseController.php b/h-source/Application/Controllers/BaseController.php index 9287cee..4a3bb65 100644 --- a/h-source/Application/Controllers/BaseController.php +++ b/h-source/Application/Controllers/BaseController.php @@ -131,9 +131,21 @@ class BaseController extends Controller if (count($xmlRes)>0) { $configXml = htmlspecialchars_decode($xmlRes[0],ENT_QUOTES); - if (@simplexml_load_string($configXml)) + + if (Website::$useXmlConfigFile) + { + $xmlConfigFile = rtrim(Website::$xmlConfigFileFolder,'/') . '/config.xml'; + if (@simplexml_load_file($xmlConfigFile)) + { + $this->_configXml = simplexml_load_file($xmlConfigFile); + } + } + else { - $this->_configXml = simplexml_load_string($configXml); + if (@simplexml_load_string($configXml)) + { + $this->_configXml = simplexml_load_string($configXml); + } } } -- cgit v1.2.3