Clean code

This commit is contained in:
Francis Appels 2021-01-03 11:42:11 +01:00
parent 799927432c
commit cbf6fe1f62

View File

@ -80,7 +80,9 @@ if ($action == 'addcontact' && $user->rights->expedition->creer)
{
if ($result > 0 && $id > 0)
{
$result = $objectsrc->add_contact(GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'), GETPOST('type') ? GETPOST('type') : GETPOST('typecontact'), GETPOST('source'));
$contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
$typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type'));
$result = $objectsrc->add_contact($contactid, $typeid, GETPOST("source", 'aZ09'));
}
if ($result >= 0)