Fix missing contact fetch on card

This commit is contained in:
Maxime Kohlhaas 2019-10-27 12:04:01 +01:00
parent 7e9d6dc153
commit fced9ec690

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