Merge pull request #20308 from frederic34/patch-1

Fix do not modify entity on group edit
This commit is contained in:
Laurent Destailleur 2022-03-23 16:55:55 +01:00 committed by GitHub
commit 947b6008c8
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');
@ -217,8 +217,8 @@ if (empty($reshook)) {
if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
$object->entity = 0;
} else {
$object->entity = GETPOST("entity");
} elseif (GETPOSTISSET("entity")) {
$object->entity = GETPOST("entity", "int");
}
$ret = $object->update();