From 296a6431f71a5b9e758e96a6da4d60e2dea6c0b3 Mon Sep 17 00:00:00 2001 From: aFolletete Date: Sat, 7 Apr 2012 16:32:55 +0000 Subject: [PATCH] // clean code git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14541 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Currency.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/classes/Currency.php b/classes/Currency.php index bf997b16d..3bc478991 100644 --- a/classes/Currency.php +++ b/classes/Currency.php @@ -271,12 +271,10 @@ class CurrencyCore extends ObjectModel */ public static function getIdByIsoCode($iso_code, $id_shop = 0) { - $query = Currency::getIdByQuery($id_shop); - $query->where('iso_code = \''.pSQL($iso_code).'\''); + $query = Currency::getIdByQuery($id_shop); + $query->where('iso_code = \''.pSQL($iso_code).'\''); - $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query->build()); - - return (int)$result['id_currency']; + return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query->build()); } /**