7if (empty($conf) || !is_object($conf)) {
8 print
"Error, template page can't be called as URL";
12if (empty($extrafieldsobjectkey) && is_object($object)) {
13 $extrafieldsobjectkey = $object->table_element;
17if (!empty($extrafieldsobjectkey)) {
18 if (isset($extrafields->attributes[$extrafieldsobjectkey][
'label']) && is_array($extrafields->attributes[$extrafieldsobjectkey][
'label']) && count($extrafields->attributes[$extrafieldsobjectkey][
'label']) > 0) {
19 if (empty($extrafieldsobjectprefix)) {
20 $extrafieldsobjectprefix =
'ef.';
22 foreach ($extrafields->attributes[$extrafieldsobjectkey][
'label'] as $key => $val) {
23 if (!empty($extrafields->attributes[$extrafieldsobjectkey][
'list'][$key])) {
24 $arrayfields[$extrafieldsobjectprefix.$key] = array(
25 'label' => $extrafields->attributes[$extrafieldsobjectkey][
'label'][$key],
26 'type' => $extrafields->attributes[$extrafieldsobjectkey][
'type'][$key],
27 'checked' => ((
dol_eval($extrafields->attributes[$extrafieldsobjectkey][
'list'][$key], 1, 1,
'1') <= 0) ? 0 : 1),
28 'position' => $extrafields->attributes[$extrafieldsobjectkey][
'pos'][$key],
29 'enabled' => (abs((int)
dol_eval($extrafields->attributes[$extrafieldsobjectkey][
'list'][$key], 1)) != 3 &&
dol_eval($extrafields->attributes[$extrafieldsobjectkey][
'perms'][$key], 1, 1,
'1')),
30 'langfile' => $extrafields->attributes[$extrafieldsobjectkey][
'langfile'][$key],
31 'help' => $extrafields->attributes[$extrafieldsobjectkey][
'help'][$key],
dol_eval($s, $returnvalue=0, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.