From 195a3353d7cc4bd9062f1baa8cdcc0fa92c0e87c Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 2 Jul 2012 15:24:15 +0000 Subject: [PATCH] Add date only placeholders for timestamps: {{timestamp_placeholder/date}} --- etemplate/inc/class.bo_merge.inc.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/etemplate/inc/class.bo_merge.inc.php b/etemplate/inc/class.bo_merge.inc.php index 865c47f511..95c43415e2 100644 --- a/etemplate/inc/class.bo_merge.inc.php +++ b/etemplate/inc/class.bo_merge.inc.php @@ -870,6 +870,18 @@ abstract class bo_merge { $replacements = translation::convert($replacements,translation::charset(),$charset); } + + // Date only placeholders for timestamps + if(is_array($this->date_fields)) + { + foreach($this->date_fields as $field) + { + if($value = $replacements['$$'.$field.'$$']) + { + $replacements['$$'.$field.'/date$$'] = egw_time::to($value,true); + } + } + } if ($is_xml) // zip'ed xml document (eg. OO) { // Numeric fields