[-] Installer : Currency not installed when offline
This commit is contained in:
1 parent
4d9a7e684b
commit
dcfd95f959
1 file changed
+4
-7
@@ -238,12 +238,7 @@ class LocalizationPackCore
|
|||||||
{
|
{
|
||||||
if (isset($xml->currencies->currency))
|
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)
|
foreach ($xml->currencies->currency as $data)
|
||||||
{
|
{
|
||||||
@@ -276,7 +271,9 @@ class LocalizationPackCore
|
|||||||
PaymentModule::addCurrencyPermissions($currency->id);
|
PaymentModule::addCurrencyPermissions($currency->id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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();
|
Currency::refreshCurrencies();
|
||||||
|
|
||||||
if (!count($this->_errors) && $install_mode && isset($attributes['iso_code']) && count($xml->currencies->currency) == 1)
|
if (!count($this->_errors) && $install_mode && isset($attributes['iso_code']) && count($xml->currencies->currency) == 1)
|
||||||
|
|||||||
Reference in new issue
Block a user