// Fix on Module API for retrocompatibility
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9793 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+1
-1
@@ -840,7 +840,7 @@ abstract class ModuleCore
|
||||
$sql .= '
|
||||
LEFT JOIN `'._DB_PREFIX_.'group_module_restriction` gmr ON gmr.`id_module` = m.`id_module`';
|
||||
$sql .= '
|
||||
WHERE h.`name` = \''.$hookPayment.'\'
|
||||
WHERE h.`name` = \''.pSQL($hookPayment).'\'
|
||||
AND mc.id_country = '.(int)($billing->id_country).'
|
||||
AND mc.id_shop = '.(int)$context->shop->getID(true).'
|
||||
AND mg.id_shop = '.(int)$context->shop->getID(true).'
|
||||
|
||||
@@ -538,12 +538,16 @@ abstract class PaymentModuleCore extends Module
|
||||
*/
|
||||
public static function getInstalledPaymentModules()
|
||||
{
|
||||
$hookPayment = 'Payment';
|
||||
if (Db::getInstance()->getValue('SELECT `id_hook` FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'displayPayment\''))
|
||||
$hookPayment = 'displayPayment';
|
||||
|
||||
return Db::getInstance()->executeS('
|
||||
SELECT DISTINCT m.`id_module`, h.`id_hook`, m.`name`, hm.`position`
|
||||
FROM `'._DB_PREFIX_.'module` m
|
||||
LEFT JOIN `'._DB_PREFIX_.'hook_module` hm ON hm.`id_module` = m.`id_module`
|
||||
LEFT JOIN `'._DB_PREFIX_.'hook` h ON hm.`id_hook` = h.`id_hook`
|
||||
WHERE h.`name` = \'payment\'
|
||||
WHERE h.`name` = \''.pSQL($hookPayment).'\'
|
||||
AND m.`active` = 1
|
||||
');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user