From cdc355fea063e910c489fa81480711c5b129bff4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Mar 2013 17:21:51 +0100 Subject: [PATCH] Fix: Missing hookmanager --- htdocs/install/upgrade.php | 4 ++++ htdocs/install/upgrade2.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 28aea7628e9..2df2c8db4b9 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -115,6 +115,10 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action'))) $db=getDoliDBInstance($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name,$conf->db->port); + // Create the global $hookmanager object + include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; + $hookmanager=new HookManager($db); + if ($db->connected == 1) { print ''; diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 47218300ad5..c40a8dfb4b8 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -107,6 +107,10 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action'))) $db=getDoliDBInstance($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name,$conf->db->port); + // Create the global $hookmanager object + include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; + $hookmanager=new HookManager($db); + if ($db->connected != 1) { print ''.$langs->trans("ErrorFailedToConnectToDatabase",$conf->db->name).''.$langs->trans('Error').'';