summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-02-17 09:12:22 +0000
committeralecpl <alec@alec.pl>2011-02-17 09:12:22 +0000
commitc5dedd79caa2b083b264ce0af16cd54e968b817c (patch)
tree3013a073210e7f038a126a6741d1ff57c2fe8fa3 /program
parent31036bb3eb65f9b6513631a71936fe19f302815c (diff)
- Add variable for 'Today' label in date_today option (#1486120)
Diffstat (limited to 'program')
-rw-r--r--program/include/main.inc13
1 files changed, 12 insertions, 1 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index 568b3349d..f2923c52e 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -1118,7 +1118,18 @@ function format_date($date, $format=NULL)
$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;
}