Clean code for better extrafields management

This commit is contained in:
Laurent Destailleur
2018-04-13 12:52:23 +02:00
parent 1521b0595b
commit fbae4429b7
16 changed files with 259 additions and 274 deletions

View File

@@ -5967,7 +5967,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob
$extrafieldstmp = new ExtraFields($db);
$extralabels = $extrafieldstmp->fetch_name_optionals_label($object->table_element, true);
$object->fetch_optionals();
foreach ($extrafieldstmp->attribute_label as $key => $label) {
foreach ($extrafieldstmp->attributes[$object->table_element]['label'] as $key => $label) {
$substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '__'] = $object->array_options['options_' . $key];
}
}