diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-07-21 10:26:24 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-07-21 10:26:24 +0000 |
| commit | 28f32354825a34c54c9004c5a9f920a5f9eb1f41 (patch) | |
| tree | 4be6ce3289bef474d2685202c8182ef5637249a2 | |
| parent | b4713c508f5987ec91e8d67c290d9066a28c563c (diff) | |
- use long date format in print mode (#1485191)
git-svn-id: https://svn.roundcube.net/trunk@1601 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/CHANGELOG | 4 | ||||
| -rw-r--r-- | roundcubemail/program/include/main.inc | 2 | ||||
| -rw-r--r-- | roundcubemail/program/steps/mail/func.inc | 11 |
3 files changed, 14 insertions, 3 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index ac2702ba1..f7585c250 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -1,6 +1,10 @@ CHANGELOG RoundCube Webmail --------------------------- +2008/07/21 (alec) +---------- +- use long date format in print mode (#1485191) + 2008/07/18 (alec) ---------- - Updated TinyMCE to version 3.1.0.1 diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index d75921f3a..65b322f8e 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -754,6 +754,8 @@ function format_date($date, $format=NULL) // month name (long) else if ($format{$i}=='F') $out .= rcube_label('long'.strtolower(date('M', $timestamp))); + else if ($format{$i}=='x') + $out .= strftime('%x %X', $timestamp); else $out .= date($format{$i}, $timestamp); } diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index 6ba3d1664..58c9c8bd7 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/program/steps/mail/func.inc @@ -658,7 +658,7 @@ function rcmail_str_replacement($str, &$rep) */ function rcmail_message_headers($attrib, $headers=NULL) { - global $IMAP, $OUTPUT, $MESSAGE; + global $IMAP, $OUTPUT, $MESSAGE, $PRINT_MODE, $CONFIG; static $sa_attrib; // keep header table attrib @@ -678,7 +678,7 @@ function rcmail_message_headers($attrib, $headers=NULL) // add empty subject if none exsists if (empty($headers['subject'])) $headers['subject'] = rcube_label('nosubject'); - + $header_count = 0; // allow the following attributes to be added to the <table> tag @@ -694,7 +694,12 @@ function rcmail_message_headers($attrib, $headers=NULL) continue; if ($hkey=='date' && !empty($headers[$hkey])) - $header_value = format_date($headers[$hkey]); + { + if ($PRINT_MODE) + $header_value = format_date($headers[$hkey], $CONFIG['date_long'] ? $CONFIG['date_long'] : 'x'); + else + $header_value = format_date($headers[$hkey]); + } else if (in_array($hkey, array('from', 'to', 'cc', 'bcc', 'reply-to'))) $header_value = Q(rcmail_address_string($headers[$hkey], NULL, $attrib['addicon']), 'show'); else |
