// Remove cleanPositions() in modules when a hook module is added (since the hook module go in last position, we don't need to recalculate all positions) -> greatly improve module installation phase in new installer

This commit is contained in:
rMalie
2011-12-30 10:58:25 +00:00
parent 27b00e8bf6
commit cc3e8fd01f

View File

@@ -632,19 +632,14 @@ abstract class ModuleCore
$position = 0;
// Register module in hook
$result = Db::getInstance()->autoExecute(_DB_PREFIX_.'hook_module', array(
$return &= Db::getInstance()->autoExecute(_DB_PREFIX_.'hook_module', array(
'id_module' => (int)$this->id,
'id_hook' => (int)$hookID,
'id_shop' => (int)$shopID,
'position' => (int)($position + 1),
), 'INSERT');
if (!$result)
$return &= false;
}
// Clean modules position
$this->cleanPositions($hookID, $shopList);
return $return;
}