diff options
| author | Antonio Gallo <tonicucoz@gmail.com> | 2012-10-29 20:46:43 +0000 | 
|---|---|---|
| committer | Antonio Gallo <tonicucoz@gmail.com> | 2012-10-29 20:46:43 +0000 | 
| commit | 43d6dd8b1a4655f1aa5b642c0b3302166e39065e (patch) | |
| tree | e47b61f26160f1296860a26d15cd7a13533fc6da /h-source | |
| parent | 9b42c2f0488f798fdcbc0d49777fff812136142d (diff) | |
solved issue indicated by Michał Masłowski
Diffstat (limited to 'h-source')
| -rw-r--r-- | h-source/Application/Controllers/BaseController.php | 25 | ||||
| -rw-r--r-- | 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',  | 
