diff options
author | alecpl <alec@alec.pl> | 2008-05-05 09:59:56 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2008-05-05 09:59:56 +0000 |
commit | 1088d667458ae03a54fcb4b8d290f6218e84d304 (patch) | |
tree | cc19068e5b69b2b3b7ae1fa5cfc346d7b2b8519b | |
parent | b61965256e2a7e2e01ccb1b7f42820545a6ae11b (diff) |
- Do charset conversion also for from/to column on messages list
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | program/steps/mail/func.inc | 10 |
2 files changed, 6 insertions, 5 deletions
@@ -4,6 +4,7 @@ CHANGELOG RoundCube Webmail 2008/05/05 (alec) ---------- - Installer: encode special characters in DB username/password (#1485042) +- Do charset conversion also for from/to column on messages list 2008/05/02 (alec) ---------- diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 1c1a4c6e7..34586ddc7 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -231,12 +231,12 @@ function rcmail_message_list($attrib) $zebra_class); $out .= sprintf("<td class=\"icon\">%s</td>\n", $message_icon ? sprintf($image_tag, $skin_path, $message_icon, '') : ''); - + // format each col foreach ($a_show_cols as $col) { if ($col=='from' || $col=='to') - $cont = Q(rcmail_address_string($header->$col, 3, $attrib['addicon']), 'show'); + $cont = Q(rcmail_address_string(rcube_imap::decode_mime_string($header->$col, $header->charset), 3, $attrib['addicon']), 'show'); else if ($col=='subject') { $action = $mbox==$CONFIG['drafts_mbox'] ? 'compose' : 'show'; @@ -325,7 +325,7 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE) foreach ($a_show_cols as $col) { if ($col=='from' || $col=='to') - $cont = Q(rcmail_address_string($header->$col, 3), 'show'); + $cont = Q(rcmail_address_string(rcube_imap::decode_mime_string($header->$col, $header->charset), 3), 'show'); else if ($col=='subject') { $action = $mbox==$CONFIG['drafts_mbox'] ? 'compose' : 'show'; @@ -1277,7 +1277,7 @@ function rcmail_first_text_part($message_struct) function rcmail_address_string($input, $max=NULL, $addicon=NULL) { global $IMAP, $PRINT_MODE, $CONFIG, $OUTPUT, $EMAIL_ADDRESS_PATTERN; - + $a_parts = $IMAP->decode_address_list($input); if (!sizeof($a_parts)) @@ -1291,7 +1291,7 @@ function rcmail_address_string($input, $max=NULL, $addicon=NULL) { $j++; if ($PRINT_MODE) - $out .= sprintf('%s <%s>', Q($part['name']), $part['mailto']); + $out .= sprintf('%s <%s>', Q(rcube_charset_convert($part['name'])), $part['mailto']); else if (preg_match($EMAIL_ADDRESS_PATTERN, $part['mailto'])) { $out .= sprintf('<a href="mailto:%s" onclick="return %s.command(\'compose\',\'%s\',this)" class="rcmContactAddress" title="%s">%s</a>', |