2
0
forked from Wavyzz/dolibarr

Fix: different behavior on extrafield updates. (#30150)

This commit is contained in:
Christian Humpel
2024-06-25 10:44:36 +02:00
committed by GitHub
parent fb57a0342b
commit ada3ed0a7c
5 changed files with 15 additions and 10 deletions

View File

@@ -1513,16 +1513,17 @@ if (empty($reshook)) {
if ($action == 'update_extras') {
$object->oldcopy = dol_clone($object, 2);
$attribute_name = GETPOST('attribute', 'restricthtml');
// Fill array 'array_options' with data from update form
$ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml'));
$ret = $extrafields->setOptionalsFromPost(null, $object, $attribute_name);
if ($ret < 0) {
$error++;
}
if (!$error) {
// Actions on extra fields
$result = $object->insertExtraFields('ORDER_MODIFY');
$result = $object->updateExtraField($attribute_name, 'ORDER_MODIFY');
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
$error++;