[-] BO : Update Accounting geolocalization for France

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14014 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vSchoener
2012-03-09 14:36:43 +00:00
parent 0731890ea8
commit 3c1ab4ba56
6 changed files with 67 additions and 25 deletions
+25
View File
@@ -53,6 +53,7 @@ class LocalizationPackCore
$res &= $this->installConfiguration($xml);
$res &= $this->installModules($xml);
$res &= $this->updateDefaultGroupDisplayMethod($xml);
$res &= $this->installAccounting($xml);
if (!defined('_PS_MODE_DEV_') || !_PS_MODE_DEV_)
$res &= $this->_installLanguages($xml, $install_mode);
@@ -75,6 +76,30 @@ class LocalizationPackCore
return true;
}
/**
* Install the default value for accounting
*
* @param $xml
* @return true
*/
protected function installAccounting($xml)
{
if (isset($xml->accounting->conf))
{
$acc_conf = Accounting::getConfiguration();
foreach ($xml->accounting->conf as $conf)
{
$attributes = $conf->attributes();
if (isset($attributes['name']) &&
isset($attributes['value']) &&
isset($acc_conf[(string)($attributes['name'])]))
$acc_conf[(string)($attributes['name'])] = (string)$attributes['value'];
}
Accounting::updateConfiguration($acc_conf);
}
return true;
}
protected function _installStates($xml)
{
if (isset($xml->states->state))