forked from Wavyzz/dolibarr
Fix: different behavior on extrafield updates. (#30150)
This commit is contained in:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user