Merge pull request #12238 from atm-maxime/fix_fetch_contact

Fix missing contact fetch on card
This commit is contained in:
Laurent Destailleur 2019-10-30 03:04:01 +01:00 committed by GitHub
commit c2638f4148
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,6 +78,14 @@ $result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'ro
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('contactcard','globalcard'));
if ($id > 0) $object->fetch($id);
if (! ($object->id > 0) && $action == 'view')
{
$langs->load("errors");
print($langs->trans('ErrorRecordNotFound'));
exit;
}
/*
* Actions