Merge pull request #20308 from frederic34/patch-1
Fix do not modify entity on group edit
This commit is contained in:
commit
947b6008c8
@ -206,8 +206,8 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
$object->oldcopy = clone $object;
|
$object->oldcopy = clone $object;
|
||||||
|
|
||||||
$object->name = GETPOST("nom", 'nohtml');
|
$object->name = GETPOST("nom", 'nohtml');
|
||||||
$object->note = dol_htmlcleanlastbr(trim(GETPOST("note", 'restricthtml')));
|
$object->note = dol_htmlcleanlastbr(trim(GETPOST("note", 'restricthtml')));
|
||||||
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||||
@ -217,8 +217,8 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
|
if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
|
||||||
$object->entity = 0;
|
$object->entity = 0;
|
||||||
} else {
|
} elseif (GETPOSTISSET("entity")) {
|
||||||
$object->entity = GETPOST("entity");
|
$object->entity = GETPOST("entity", "int");
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret = $object->update();
|
$ret = $object->update();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user