// clean code
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14541 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -271,12 +271,10 @@ class CurrencyCore extends ObjectModel
|
|||||||
*/
|
*/
|
||||||
public static function getIdByIsoCode($iso_code, $id_shop = 0)
|
public static function getIdByIsoCode($iso_code, $id_shop = 0)
|
||||||
{
|
{
|
||||||
$query = Currency::getIdByQuery($id_shop);
|
$query = Currency::getIdByQuery($id_shop);
|
||||||
$query->where('iso_code = \''.pSQL($iso_code).'\'');
|
$query->where('iso_code = \''.pSQL($iso_code).'\'');
|
||||||
|
|
||||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query->build());
|
return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query->build());
|
||||||
|
|
||||||
return (int)$result['id_currency'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user