aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Controllers')
-rw-r--r--h-source/Application/Controllers/BaseController.php25
1 files changed, 14 insertions, 11 deletions
diff --git a/h-source/Application/Controllers/BaseController.php b/h-source/Application/Controllers/BaseController.php
index 4b1246f..2355569 100644
--- a/h-source/Application/Controllers/BaseController.php
+++ b/h-source/Application/Controllers/BaseController.php
@@ -128,26 +128,29 @@ class BaseController extends Controller
}
//get the configuration xml
- $xmlRes = $this->m['ParamsModel']->select('boxes_xml')->where(array('id_par'=>1))->toList('boxes_xml')->send();
- if (count($xmlRes)>0)
+ if (Website::$useXmlConfigFile)
{
- $configXml = htmlspecialchars_decode($xmlRes[0],ENT_QUOTES);
-
- if (Website::$useXmlConfigFile)
+ $xmlConfigFile = rtrim(Website::$xmlConfigFileFolder,'/') . '/config.xml';
+
+ if (@simplexml_load_file($xmlConfigFile))
{
- $xmlConfigFile = rtrim(Website::$xmlConfigFileFolder,'/') . '/config.xml';
- if (@simplexml_load_file($xmlConfigFile))
- {
- $this->_configXml = simplexml_load_file($xmlConfigFile);
- }
+ $this->_configXml = simplexml_load_file($xmlConfigFile);
}
- else
+ }
+ else
+ {
+ $xmlRes = $this->m['ParamsModel']->select('boxes_xml')->where(array('id_par'=>1))->toList('boxes_xml')->send();
+
+ if (count($xmlRes)>0)
{
+ $configXml = htmlspecialchars_decode($xmlRes[0],ENT_QUOTES);
+
if (@simplexml_load_string($configXml))
{
$this->_configXml = simplexml_load_string($configXml);
}
}
+
}
//elements of the top menu from the config.xml file