From c5dedd79caa2b083b264ce0af16cd54e968b817c Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Thu, 17 Feb 2011 04:12:22 -0500 Subject: [PATCH] - Add variable for 'Today' label in date_today option (#1486120) --- program/include/main.inc | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/program/include/main.inc b/program/include/main.inc index 568b334..f2923c5 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -1118,7 +1118,18 @@ $out .= date($format{$i}, $timestamp); } - return $today ? (rcube_label('today') . ' ' . $out) : $out; + if ($today) { + $label = rcube_label('today'); + // replcae $ character with "Today" label (#1486120) + if (strpos($out, '$') !== false) { + $out = preg_replace('/\$/', $label, $out, 1); + } + else { + $out = $label . ' ' . $out; + } + } + + return $out; } -- Gitblit v1.9.1