From cc3e8fd01ffccf1be7a011724b4dbd7a8deea929 Mon Sep 17 00:00:00 2001 From: rMalie Date: Fri, 30 Dec 2011 10:58:25 +0000 Subject: [PATCH] // 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 --- classes/Module.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/classes/Module.php b/classes/Module.php index 4f5ca8ceb..81e74bf03 100644 --- a/classes/Module.php +++ b/classes/Module.php @@ -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; }