perms can be an expression and must be evaluated

This commit is contained in:
atm-greg 2022-02-28 18:38:37 +01:00
parent 5eef80750a
commit bc8ea7571b

View File

@ -25,7 +25,7 @@ if (!empty($extrafieldsobjectkey)) { // $extrafieldsobject is the $object->table
'type' => $extrafields->attributes[$extrafieldsobjectkey]['type'][$key],
'checked' => ((dol_eval($extrafields->attributes[$extrafieldsobjectkey]['list'][$key],1) <= 0) ? 0 : 1),
'position' => $extrafields->attributes[$extrafieldsobjectkey]['pos'][$key],
'enabled' => (abs((int) $extrafields->attributes[$extrafieldsobjectkey]['list'][$key]) != 3 && $extrafields->attributes[$extrafieldsobjectkey]['perms'][$key]),
'enabled' => (abs((int) $extrafields->attributes[$extrafieldsobjectkey]['list'][$key]) != 3 && dol_eval($extrafields->attributes[$extrafieldsobjectkey]['perms'][$key],1)),
'langfile' => $extrafields->attributes[$extrafieldsobjectkey]['langfile'][$key],
'help' => $extrafields->attributes[$extrafieldsobjectkey]['help'][$key],
);