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