From 89d9fe39198b711dbea42ab5719a09f4cb885d5e Mon Sep 17 00:00:00 2001 From: bgenere Date: Wed, 30 May 2018 17:08:01 +0200 Subject: [PATCH] FIX Issue for extra fields date display in template. Template is now consistent with the extrafiels_view template --- htdocs/core/tpl/extrafields_list_print_fields.tpl.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php index 2576873a2c5..e59f50501ab 100644 --- a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php +++ b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php @@ -25,7 +25,12 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_ $tmpkey='options_'.$key; if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('date', 'datetime', 'timestamp'))) { - $value = $db->jdate($obj->$tmpkey); + $datenotinstring = $obj->$tmpkey; + if (! is_numeric($obj->$tmpkey)) // For backward compatibility + { + $datenotinstring = $db->jdate($datenotinstring); + } + $value = $datenotinstring; } else {