// Fixed missing parameters when calling Currency::exists
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13450 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
2c7720ab08
commit
2145cd543b
2 files changed
+3
-3
No files matched your search
@@ -115,7 +115,7 @@ class CurrencyCore extends ObjectModel
|
|||||||
*/
|
*/
|
||||||
public function add($autodate = true, $nullValues = false)
|
public function add($autodate = true, $nullValues = false)
|
||||||
{
|
{
|
||||||
return Currency::exists($this->iso_code) ? false : parent::add();
|
return Currency::exists($this->iso_code, $this->iso_code_num) ? false : parent::add();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ class LocalizationPackCore
|
|||||||
foreach ($xml->currencies->currency as $data)
|
foreach ($xml->currencies->currency as $data)
|
||||||
{
|
{
|
||||||
$attributes = $data->attributes();
|
$attributes = $data->attributes();
|
||||||
if (Currency::exists($attributes['iso_code']))
|
if (Currency::exists($attributes['iso_code'], (int)$attributes['iso_code_num']))
|
||||||
continue;
|
continue;
|
||||||
$currency = new Currency();
|
$currency = new Currency();
|
||||||
$currency->name = (string)$attributes['name'];
|
$currency->name = (string)$attributes['name'];
|
||||||
@@ -260,7 +260,7 @@ class LocalizationPackCore
|
|||||||
$this->_errors[] = Tools::displayError('Invalid currency properties.');
|
$this->_errors[] = Tools::displayError('Invalid currency properties.');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!Currency::exists($currency->iso_code))
|
if (!Currency::exists($currency->iso_code, $currency->iso_code_num))
|
||||||
{
|
{
|
||||||
if (!$currency->add())
|
if (!$currency->add())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user