diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index cecb4fff28a..3844373328d 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1387,7 +1387,7 @@ if (empty($reshook)) { } elseif ($action == 'swapstatut') { // Toggle the status of a contact if ($object->fetch($id) > 0) { - $result = $object->swapContactStatus(GETPOST('ligne')); + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } else { dol_print_error($db); } diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index 60d3836cfcb..3bbe232be6e 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -93,7 +93,7 @@ if ($action == 'addcontact' && $user->rights->propale->creer) { } elseif ($action == 'swapstatut' && $user->rights->propale->creer) { // Toggle the status of a contact if ($object->id > 0) { - $result = $object->swapContactStatus(GETPOST('ligne')); + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } } elseif ($action == 'deletecontact' && $user->rights->propale->creer) { // Deletes a contact diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index a46e7df6b75..8e0dc91756c 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1370,7 +1370,7 @@ if (empty($reshook)) { } elseif ($action == 'swapstatut') { // bascule du statut d'un contact if ($object->id > 0) { - $result = $object->swapContactStatus(GETPOST('ligne')); + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } else { dol_print_error($db); } diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 0a576707e73..5e11c5cb030 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -75,14 +75,14 @@ if ($action == 'addcontact' && $user->rights->commande->creer) { } elseif ($action == 'swapstatut' && $user->rights->commande->creer) { // bascule du statut d'un contact if ($object->fetch($id)) { - $result = $object->swapContactStatus(GETPOST('ligne')); + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } else { dol_print_error($db); } } elseif ($action == 'deletecontact' && $user->rights->commande->creer) { // Efface un contact $object->fetch($id); - $result = $object->delete_contact($_GET["lineid"]); + $result = $object->delete_contact(GETPOST("lineid", 'int')); if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 35f4a3cb140..417ecfeb2e2 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -2773,7 +2773,7 @@ if (empty($reshook)) { } elseif ($action == 'swapstatut') { // bascule du statut d'un contact if ($object->fetch($id)) { - $result = $object->swapContactStatus(GETPOST('ligne')); + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } else { dol_print_error($db); } diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index 19e76b15c5c..2105e197e1f 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -82,7 +82,7 @@ if ($action == 'addcontact' && $user->rights->facture->creer) { } } elseif ($action == 'swapstatut' && $user->rights->facture->creer) { // Toggle the status of a contact - $result = $object->swapContactStatus(GETPOST('ligne')); + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } elseif ($action == 'deletecontact' && $user->rights->facture->creer) { // Deletes a contact $result = $object->delete_contact($lineid); diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 88627ca0698..5c0ad2747ba 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -54,6 +54,8 @@ $langs->loadLangs(array("contracts", "orders", "companies", "bills", "products", $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'alpha'); + $socid = GETPOST('socid', 'int'); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); @@ -113,7 +115,7 @@ if (empty($reshook)) { include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once if ($action == 'confirm_active' && $confirm == 'yes' && $user->rights->contrat->activer) { - $result = $object->active_line($user, GETPOST('ligne'), GETPOST('date'), GETPOST('dateend'), GETPOST('comment')); + $result = $object->active_line($user, GETPOST('ligne', 'int'), GETPOST('date'), GETPOST('dateend'), GETPOST('comment')); if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); @@ -127,7 +129,7 @@ if (empty($reshook)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd")), null, 'errors'); } if (!$error) { - $result = $object->close_line($user, GETPOST('ligne'), GETPOST('dateend'), urldecode(GETPOST('comment'))); + $result = $object->close_line($user, GETPOST('ligne', 'int'), GETPOST('dateend'), urldecode(GETPOST('comment'))); if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; @@ -931,10 +933,10 @@ if (empty($reshook)) { } } elseif ($action == 'swapstatut') { // bascule du statut d'un contact - $result = $object->swapContactStatus(GETPOST('ligne')); + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } elseif ($action == 'deletecontact') { // Efface un contact - $result = $object->delete_contact(GETPOST('lineid')); + $result = $object->delete_contact(GETPOST('lineid', 'int')); if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); @@ -1747,25 +1749,25 @@ if ($action == 'create') { 'text' => $langs->trans("ConfirmMoveToAnotherContractQuestion"), array('type' => 'select', 'name' => 'newcid', 'values' => $arraycontractid)); - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'), $langs->trans("MoveToAnotherContract"), $langs->trans("ConfirmMoveToAnotherContract"), "confirm_move", $formquestion); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid', 'int'), $langs->trans("MoveToAnotherContract"), $langs->trans("ConfirmMoveToAnotherContract"), "confirm_move", $formquestion); print '