diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-09-18 19:50:58 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-09-18 19:50:58 +0000 |
| commit | 730969262cc5eae4f8d9302947a2cb080e378795 (patch) | |
| tree | cd1bd0a88ff30b387f67caac11730b045c8e4f2e | |
| parent | 303eb6ae65c29a9a829154f49a197174a7abba59 (diff) | |
Trim and abbreviate subjects in message listing
git-svn-id: https://svn.roundcube.net/trunk@1831 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/program/steps/mail/func.inc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index 440de92b9..49dfe5f6a 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/program/steps/mail/func.inc @@ -259,9 +259,9 @@ function rcmail_message_list($attrib) { $action = $mbox==$CONFIG['drafts_mbox'] ? 'compose' : 'show'; $uid_param = $mbox==$CONFIG['drafts_mbox'] ? '_draft_uid' : '_uid'; - $cont = Q($IMAP->decode_header($header->$col)); - if (empty($cont)) $cont = Q(rcube_label('nosubject')); - $cont = sprintf('<a href="%s" onclick="return rcube_event.cancel(event)">%s</a>', Q(rcmail_url($action, array($uid_param=>$header->uid, '_mbox'=>$mbox))), $cont); + $cont = abbreviate_string(trim($IMAP->decode_header($header->$col)), 160); + if (empty($cont)) $cont = rcube_label('nosubject'); + $cont = sprintf('<a href="%s" onclick="return rcube_event.cancel(event)">%s</a>', Q(rcmail_url($action, array($uid_param=>$header->uid, '_mbox'=>$mbox))), Q($cont)); } else if ($col=='flag') $cont = $flagged_icon ? sprintf($image_tag, $skin_path, $flagged_icon, '') : ''; @@ -363,9 +363,9 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE) { $action = $mbox==$CONFIG['drafts_mbox'] ? 'compose' : 'show'; $uid_param = $mbox==$CONFIG['drafts_mbox'] ? '_draft_uid' : '_uid'; - $cont = Q($IMAP->decode_header($header->$col)); - if (!$cont) $cont = Q(rcube_label('nosubject')); - $cont = sprintf('<a href="%s" onclick="return rcube_event.cancel(event)">%s</a>', Q(rcmail_url($action, array($uid_param=>$header->uid, '_mbox'=>$mbox))), $cont); + $cont = abbreviate_string(trim($IMAP->decode_header($header->$col)), 160); + if (!$cont) $cont = rcube_label('nosubject'); + $cont = sprintf('<a href="%s" onclick="return rcube_event.cancel(event)">%s</a>', Q(rcmail_url($action, array($uid_param=>$header->uid, '_mbox'=>$mbox))), Q($cont)); } else if ($col=='size') $cont = show_bytes($header->$col); @@ -809,7 +809,7 @@ function rcmail_message_headers($attrib, $headers=NULL) else if (in_array($hkey, array('from', 'to', 'cc', 'bcc'))) $header_value = Q(rcmail_address_string($headers[$hkey], null, true, $attrib['addicon']), 'show'); else - $header_value = Q($IMAP->decode_header($headers[$hkey])); + $header_value = Q(trim($IMAP->decode_header($headers[$hkey]))); $out .= "\n<tr>\n"; $out .= '<td class="header-title">'.Q(rcube_label($hkey)).": </td>\n"; |
