[-] Installer : Currency not installed when offline

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12729 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
fBrignoli
2012-01-26 17:31:19 +00:00
parent 9f7622fc6e
commit ac0a5b465d
+5 -8
View File
@@ -238,12 +238,7 @@ class LocalizationPackCore
{
if (isset($xml->currencies->currency))
{
if (!$feed = Tools::simplexml_load_file('http://api.prestashop.com/xml/currencies.xml')
&& !$feed = @simplexml_load_file(dirname(__FILE__).'/../localization/currencies.xml'))
{
$this->_errors[] = Tools::displayError('Cannot parse the currencies XML feed.');
return false;
}
foreach ($xml->currencies->currency as $data)
{
@@ -276,8 +271,10 @@ class LocalizationPackCore
PaymentModule::addCurrencyPermissions($currency->id);
}
}
Currency::refreshCurrencies();
if (!$feed = Tools::simplexml_load_file('http://api.prestashop.com/xml/currencies.xml'))
$this->_errors[] = Tools::displayError('Cannot parse the currencies XML feed.');
else
Currency::refreshCurrencies();
if (!count($this->_errors) && $install_mode && isset($attributes['iso_code']) && count($xml->currencies->currency) == 1)
$this->iso_currency = $attributes['iso_code'];