[*] Classes: Db->execute() now return always a boolean. Use Db->query() instead.
This commit is contained in:
@@ -666,17 +666,17 @@ abstract class Module
|
||||
if (!isset(self::$_hookModulesCache))
|
||||
{
|
||||
$db = Db::getInstance(_PS_USE_SQL_SLAVE_);
|
||||
$result = $db->executeS('
|
||||
$results = $db->executeS('
|
||||
SELECT h.`name` as hook, m.`id_module`, h.`id_hook`, m.`name` as module, h.`live_edit`
|
||||
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`
|
||||
AND m.`active` = 1
|
||||
ORDER BY hm.`position`', false);
|
||||
ORDER BY hm.`position`');
|
||||
self::$_hookModulesCache = array();
|
||||
|
||||
if ($result)
|
||||
while ($row = $db->nextRow())
|
||||
if ($results)
|
||||
foreach ($results as $row)
|
||||
{
|
||||
$row['hook'] = strtolower($row['hook']);
|
||||
if (!isset(self::$_hookModulesCache[$row['hook']]))
|
||||
|
||||
Reference in New Issue
Block a user