// 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:
fSerny
2011-11-02 12:42:48 +00:00
parent 33ecd84fb1
commit 86e51ee01a
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -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
');
}