From a6c08c7340ad280ce2c7950b71efcca3d1a6c2f0 Mon Sep 17 00:00:00 2001 From: rMalie Date: Tue, 12 Jul 2011 16:28:33 +0000 Subject: [PATCH] git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7605 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Module.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/Module.php b/classes/Module.php index 9be2d283f..6acff970d 100644 --- a/classes/Module.php +++ b/classes/Module.php @@ -825,8 +825,8 @@ abstract class ModuleCore LEFT JOIN `'._DB_PREFIX_.'hook` h ON hm.`id_hook` = h.`id_hook` WHERE h.`name` = \'payment\' AND mc.id_country = '.(int)($billing->id_country).' - AND mc.id_shop = '.(int)Shop::getCurrentShop().' - AND mg.id_shop = '.(int)Shop::getCurrentShop().' + AND mc.id_shop = '.$context->shop->getID().' + AND mg.id_shop = '.$context->shop->getID().' AND (SELECT COUNT(*) FROM '._DB_PREFIX_.'module_shop ms WHERE ms.id_module = m.id_module AND ms.id_shop IN('.implode(', ', $list).')) = '.count($list).' AND hm.id_shop IN('.implode(', ', $list).') GROUP BY hm.id_hook, hm.id_module @@ -835,7 +835,7 @@ abstract class ModuleCore if ($result) foreach ($result AS $k => $module) if (($moduleInstance = Module::getInstanceByName($module['name'])) AND is_callable(array($moduleInstance, 'hookpayment'))) - if (!$moduleInstance->currencies OR ($moduleInstance->currencies AND sizeof(Currency::checkPaymentCurrencies($moduleInstance->id, (int)Shop::getCurrentShop())))) + if (!$moduleInstance->currencies OR ($moduleInstance->currencies AND sizeof(Currency::checkPaymentCurrencies($moduleInstance->id)))) $output .= call_user_func(array($moduleInstance, 'hookpayment'), $hookArgs); return $output; }