Frédéric FRANCE 2022-03-08 21:19:29 +01:00 committed by GitHub
parent c7bb6c3c4c
commit 3dfd92e9c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,8 +206,8 @@ if (empty($reshook)) {
$object->oldcopy = clone $object;
$object->name = GETPOST("nom", 'nohtml');
$object->note = dol_htmlcleanlastbr(trim(GETPOST("note", 'restricthtml')));
$object->name = GETPOST("nom", 'nohtml');
$object->note = dol_htmlcleanlastbr(trim(GETPOST("note", 'restricthtml')));
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
@ -218,7 +218,7 @@ if (empty($reshook)) {
if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
$object->entity = 0;
} else {
$object->entity = GETPOST("entity");
$object->entity = GETPOSTISSET("entity") ? GETPOST("entity") : $conf->entity;
}
$ret = $object->update();