Skip to content
Snippets Groups Projects
Commit def64038 authored by Laurent Destailleur's avatar Laurent Destailleur Committed by GitHub
Browse files

Merge pull request #6966 from atm-ph/fix_develop_can_not_update_extra

Fix can not update extrafields values
parents 58a407d9 0f80ee75
No related branches found
No related tags found
No related merge requests found
......@@ -175,6 +175,21 @@ if (empty($reshook))
$result=$object->update($object->id, $user);
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
}
if ($action == 'update_extras') {
$object->fetch($id);
// Fill array 'array_options' with data from update form
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
$ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute'));
if ($ret < 0) $error++;
if (! $error)
{
$result = $object->insertExtraFields();
if ($result < 0) $error++;
}
if ($error) $action = 'edit_extras';
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment