diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-02-17 09:12:22 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-02-17 09:12:22 +0000 |
| commit | 8a5d9d1e6ff8fd5b30c5ea024aa0311aab70a6bb (patch) | |
| tree | 2e426a8914a38fffb9442ae0c6f8fd745f3f9b55 /roundcubemail/program/include | |
| parent | bdc249e7015a1733cc697ed7e8c835c4e40b2067 (diff) | |
- Add variable for 'Today' label in date_today option (#1486120)
git-svn-id: https://svn.roundcube.net/trunk@4557 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rw-r--r-- | roundcubemail/program/include/main.inc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index 568b3349d..f2923c52e 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/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; } |
