aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/BaseController.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2012-10-29 20:46:43 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2012-10-29 20:46:43 +0000
commit43d6dd8b1a4655f1aa5b642c0b3302166e39065e (patch)
treee47b61f26160f1296860a26d15cd7a13533fc6da /h-source/Application/Controllers/BaseController.php
parent9b42c2f0488f798fdcbc0d49777fff812136142d (diff)
solved issue indicated by Michał Masłowski
Diffstat (limited to 'h-source/Application/Controllers/BaseController.php')
-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