Merge pull request #15453 from frederic34/patch-18

add filters
This commit is contained in:
Laurent Destailleur 2020-11-20 13:35:49 +01:00 committed by GitHub
commit 2368b5199d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,18 +93,18 @@ if (empty($reshook))
// Ajout entrepot // Ajout entrepot
if ($action == 'add' && $user->rights->stock->creer) if ($action == 'add' && $user->rights->stock->creer)
{ {
$object->ref = GETPOST("ref"); $object->ref = (string) GETPOST("ref", "alpha");
$object->fk_parent = GETPOST("fk_parent"); $object->fk_parent = (int) GETPOST("fk_parent", "int");
$object->label = GETPOST("libelle"); $object->label = (string) GETPOST("libelle", "alpha");
$object->description = GETPOST("desc"); $object->description = (string) GETPOST("desc", "alpha");
$object->statut = GETPOST("statut"); $object->statut = GETPOST("statut");
$object->lieu = GETPOST("lieu"); $object->lieu = (string) GETPOST("lieu", "alpha");
$object->address = GETPOST("address"); $object->address = (string) GETPOST("address", "alpha");
$object->zip = GETPOST("zipcode"); $object->zip = (string) GETPOST("zipcode", "alpha");
$object->town = GETPOST("town"); $object->town = (string) GETPOST("town", "alpha");
$object->country_id = GETPOST("country_id"); $object->country_id = GETPOST("country_id");
$object->phone = GETPOST("phone"); $object->phone = (string) GETPOST("phone", "alpha");
$object->fax = GETPOST("fax"); $object->fax = (string) GETPOST("fax", "alpha");
if (!empty($object->label)) { if (!empty($object->label)) {
// Fill array 'array_options' with data from add form // Fill array 'array_options' with data from add form