From 43d6dd8b1a4655f1aa5b642c0b3302166e39065e Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Mon, 29 Oct 2012 20:46:43 +0000 Subject: solved issue indicated by Michał Masłowski MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Application/Controllers/BaseController.php | 25 ++++++++++++---------- h-source/tables.sql | 2 +- 2 files changed, 15 insertions(+), 12 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 diff --git a/h-source/tables.sql b/h-source/tables.sql index 8d0b671..7d75b76 100644 --- a/h-source/tables.sql +++ b/h-source/tables.sql @@ -402,7 +402,7 @@ CREATE TABLE IF NOT EXISTS `revisions` ( `comm_year` char(15) NOT NULL, `id_hard` int(10) unsigned NOT NULL, `pci_id` char(10) NOT NULL, - `subtype` char(25)) NOT NULL, + `subtype` char(25) NOT NULL, `driver` varchar(50) NOT NULL, `interface` char(15) NOT NULL DEFAULT 'not-specified', `bios` char(20) NOT NULL DEFAULT 'not-specified', -- cgit v1.2.3