diff --git a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php index 58915b7a786..e77d0ee0eaf 100644 --- a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php +++ b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php @@ -58,10 +58,16 @@ else // Old method if (in_array($extrafields->attribute_type[$key], array('date', 'datetime', 'timestamp'))) { $value = $db->jdate($obj->$tmpkey); + if (is_array($obj->array_options) && isset($obj->array_options[$tmpkey])){ + $value = $db->jdate($obj->array_options[$tmpkey]); + } } else { $value = $obj->$tmpkey; + if (is_array($obj->array_options) && isset($obj->array_options[$tmpkey])){ + $value = $obj->array_options[$tmpkey]; + } } print $extrafields->showOutputField($key, $value, ''); print ''; @@ -74,4 +80,4 @@ else // Old method } } } -} \ No newline at end of file +} diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index 190659628f2..8c8f6c8df54 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -1,6 +1,7 @@ - * + * Copyright (C) 2018 Nicolas ZABOURI + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -237,14 +238,14 @@ print "\n"; if ($ret) { - foreach ($object->lines as $resource) + foreach ($object->lines as $obj) { print ''; if (! empty($arrayfields['t.ref']['checked'])) { print ''; - print $resource->getNomUrl(5); + print $obj->getNomUrl(5); print ''; if (! $i) $totalarray['nbfield']++; } @@ -252,7 +253,7 @@ if ($ret) if (! empty($arrayfields['ty.label']['checked'])) { print ''; - print $resource->type_label; + print $obj->type_label; print ''; if (! $i) $totalarray['nbfield']++; } @@ -260,11 +261,11 @@ if ($ret) include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; print ''; - print ''; + print ''; print img_edit(); print ''; print ' '; - print ''; + print ''; print img_delete(); print ''; print '';