diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index cda8fc0bc13..f7a97c8af82 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -173,7 +173,12 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ // Create the global $hookmanager object include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($db); - $reshook = $hookmanager->initHooks(array('doUpgradeBefore')); + $hookmanager->initHooks(array('upgrade2')); + + $parameters = array('versionfrom' => $versionfrom, 'versionto' => $versionto); + $object = new stdClass(); + $action = "upgrade"; + $reshook = $hookmanager->executeHooks('doUpgradeBefore', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook >= 0 && is_array($hookmanager->resArray)) { // Example: $hookmanager->resArray = array(2, 3, 10); $listofentities = array_unique(array_merge($listofentities, $hookmanager->resArray));