Fix: bad parameters
This commit is contained in:
parent
f4759a0e6e
commit
2fe16db244
@ -53,7 +53,8 @@ if ($action == 'addcontact' && $user->rights->ficheinter->creer)
|
||||
{
|
||||
if ($result > 0 && $id > 0)
|
||||
{
|
||||
$result = $object->add_contact(GETPOST('contactid','int'), GETPOST('type','int'), GETPOST('source','alpha'));
|
||||
$contactid = (GETPOST('userid','int') ? GETPOST('userid','int') : GETPOST('contactid','int'));
|
||||
$result = $object->add_contact($contactid, GETPOST('type','int'), GETPOST('source','alpha'));
|
||||
}
|
||||
|
||||
if ($result >= 0)
|
||||
|
||||
@ -628,8 +628,9 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
||||
$result = $object->fetch($id);
|
||||
|
||||
if ($result > 0 && $id > 0)
|
||||
{
|
||||
$result = $object->add_contact(GETPOST('contactid','int'), GETPOST('type','int'), GETPOST('source','alpha'));
|
||||
{
|
||||
$contactid = (GETPOST('userid','int') ? GETPOST('userid','int') : GETPOST('contactid','int'));
|
||||
$result = $object->add_contact($contactid, GETPOST('type','int'), GETPOST('source','alpha'));
|
||||
}
|
||||
|
||||
if ($result >= 0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user