// 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:
+1
-6
@@ -632,19 +632,14 @@ abstract class ModuleCore
|
|||||||
$position = 0;
|
$position = 0;
|
||||||
|
|
||||||
// Register module in hook
|
// 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_module' => (int)$this->id,
|
||||||
'id_hook' => (int)$hookID,
|
'id_hook' => (int)$hookID,
|
||||||
'id_shop' => (int)$shopID,
|
'id_shop' => (int)$shopID,
|
||||||
'position' => (int)($position + 1),
|
'position' => (int)($position + 1),
|
||||||
), 'INSERT');
|
), 'INSERT');
|
||||||
if (!$result)
|
|
||||||
$return &= false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean modules position
|
|
||||||
$this->cleanPositions($hookID, $shopList);
|
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user