Fix missing hook init

This commit is contained in:
Laurent Destailleur 2018-03-02 17:32:54 +01:00
parent dfdb5b27b0
commit 63eecb46a9
4 changed files with 25 additions and 1 deletions

View File

@ -49,8 +49,13 @@ $result=restrictedArea($user,'contrat',$id);
$object = new Contrat($db); $object = new Contrat($db);
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('contractcard','globalcard'));
// Add new contact
/*
* Actions
*/
if ($action == 'addcontact' && $user->rights->contrat->creer) if ($action == 'addcontact' && $user->rights->contrat->creer)
{ {

View File

@ -77,10 +77,14 @@ if ($object->id > 0)
$upload_dir = $conf->contrat->dir_output.'/'.dol_sanitizeFileName($object->ref); $upload_dir = $conf->contrat->dir_output.'/'.dol_sanitizeFileName($object->ref);
$modulepart='contract'; $modulepart='contract';
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('contractcard','globalcard'));
/* /*
* Actions * Actions
*/ */
include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php'; include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php';

View File

@ -41,6 +41,17 @@ $ref = GETPOST('ref','alpha');
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'contrat', $id, ''); $result = restrictedArea($user, 'contrat', $id, '');
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('contractcard','globalcard'));
/*
* Actions
*/
// None
/* /*
* View * View

View File

@ -49,6 +49,10 @@ $object->fetch($id,$ref);
$permissionnote=$user->rights->contrat->creer; // Used by the include of actions_setnotes.inc.php $permissionnote=$user->rights->contrat->creer; // Used by the include of actions_setnotes.inc.php
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('contractcard','globalcard'));
/* /*
* Actions * Actions