diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index d963a4c87aa..75104d8e0a1 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -820,8 +820,8 @@ if (empty($reshook)) { $db->rollback(); $action = 'create'; - $_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ? - $_GET["originid"] = $_POST["originid"]; // Keep GET and POST here ? + $_GET["origin"] = GETPOST("origin", 'alpha'); + $_GET["originid"] = GETPOSTINT("originid"); if (!empty($errors)) { setEventMessages(null, $errors, 'errors'); } else { diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index c7baebb9cb2..342f7d9d36f 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -2296,8 +2296,8 @@ if (empty($reshook)) { } else { $db->rollback(); $action = 'create'; - $_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ? - $_GET["originid"] = $_POST["originid"]; // Keep GET and POST here ? + $_GET["origin"] = GETPOST("origin", 'alpha'); + $_GET["originid"] = GETPOSTINT("originid"); setEventMessages($object->error, $object->errors, 'errors'); } } elseif ($action == 'addline' && GETPOST('submitforalllines', 'aZ09') && (GETPOST('alldate_start', 'alpha') || GETPOST('alldate_end', 'alpha')) && $usercancreate) { diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 7ce243f7d5e..6cc2e61fe7b 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -611,8 +611,8 @@ if (empty($reshook)) { $db->rollback(); $action = 'create'; - $_GET["origin"] = $_POST["origin"]; - $_GET["originid"] = $_POST["originid"]; + $_GET["origin"] = GETPOST("origin", 'alpha'); + $_GET["originid"] = GETPOSTINT("originid"); if (!empty($errors)) { setEventMessages(null, $errors, 'errors'); } else { diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 3568e39cb5b..23fc14c332c 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -790,8 +790,8 @@ if (empty($reshook)) { } else { $db->rollback(); $action = 'create'; - $_GET["origin"] = $_POST["origin"]; // Keep this ? - $_GET["originid"] = $_POST["originid"]; // Keep this ? + $_GET["origin"] = GETPOST("origin", 'alpha'); + $_GET["originid"] = GETPOSTINT("originid"); setEventMessages("Error", null, 'errors'); $error++; } diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php index e15a108ad63..d839917e341 100644 --- a/htdocs/reception/list.php +++ b/htdocs/reception/list.php @@ -612,8 +612,8 @@ if (empty($reshook)) { $db->rollback(); $action = 'create'; - $_GET["origin"] = $_POST["origin"]; // Keep this ? - $_GET["originid"] = $_POST["originid"]; // Keep this ? + $_GET["origin"] = GETPOST("origin", 'alpha'); + $_GET["originid"] = GETPOSTINT("originid"); setEventMessages($object->error, $errors, 'errors'); $error++; }