// Fix on Module API for retrocompatibility

This commit is contained in:
fSerny
2011-11-02 12:42:48 +00:00
parent 1d8deba102
commit bd14ab595a
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
');
}