add filters

This commit is contained in:
Frédéric FRANCE 2020-11-19 21:19:54 +01:00 committed by GitHub
parent 772d401a64
commit 19a64a8350
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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