Fix: fetch object for hookmanager
This commit is contained in:
parent
63ce05b939
commit
8ec51c2a6b
@ -58,12 +58,18 @@ $confirm = GETPOST('confirm');
|
|||||||
$lineid = GETPOST('lineid');
|
$lineid = GETPOST('lineid');
|
||||||
$mesg = GETPOST('mesg');
|
$mesg = GETPOST('mesg');
|
||||||
|
|
||||||
$object = new Commande($db);
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'commande',$id,'');
|
$result=restrictedArea($user,'commande',$id,'');
|
||||||
|
|
||||||
|
$object = new Commande($db);
|
||||||
|
|
||||||
|
// Load object
|
||||||
|
if ($id > 0 || ! empty($ref))
|
||||||
|
{
|
||||||
|
$ret=$object->fetch($id, $ref);
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||||
$hookmanager=new HookManager($db);
|
$hookmanager=new HookManager($db);
|
||||||
|
|||||||
@ -81,6 +81,12 @@ $usehm=$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE;
|
|||||||
|
|
||||||
$object=new Facture($db);
|
$object=new Facture($db);
|
||||||
|
|
||||||
|
// Load object
|
||||||
|
if ($id > 0 || ! empty($ref))
|
||||||
|
{
|
||||||
|
$ret=$object->fetch($id, $ref);
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||||
$hookmanager=new HookManager($db);
|
$hookmanager=new HookManager($db);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user