From d61fd77d83926d892645a15e00c3443d2a8a6368 Mon Sep 17 00:00:00 2001 From: alec Date: Fri, 13 Apr 2012 08:52:02 +0000 Subject: - Merge devel-framework branch, resolved conflicts git-svn-id: https://svn.roundcube.net/trunk@6073 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/steps/mail/func.inc | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'roundcubemail/program/steps/mail/func.inc') diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index 8dcd37b20..319166c2d 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/program/steps/mail/func.inc @@ -230,7 +230,7 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $a_show_cols=null // Make sure there are no duplicated columns (#1486999) $a_show_cols = array_unique($a_show_cols); - // Plugins may set header's list_cols/list_flags and other rcube_mail_header variables + // Plugins may set header's list_cols/list_flags and other rcube_message_header variables // and list columns $plugin = $RCMAIL->plugins->exec_hook('messages_list', array('messages' => $a_headers, 'cols' => $a_show_cols)); @@ -1024,10 +1024,20 @@ function rcmail_message_body($attrib) foreach ($MESSAGE->parts as $i => $part) { if ($part->type == 'headers') $out .= rcmail_message_headers(sizeof($header_attrib) ? $header_attrib : NULL, $part->headers); - else if ($part->type == 'content' && $part->size) { + else if ($part->type == 'content') { + // unsapported + if ($part->realtype) { + if ($part->realtype == 'multipart/encrypted') { + $out .= html::span('part-notice', rcube_label('encryptedmessage')); + } + continue; + } + else if (!$part->size) { + continue; + } // Check if we have enough memory to handle the message in it // #1487424: we need up to 10x more memory than the body - if (!rcmail_mem_check($part->size * 10)) { + else if (!rcmail_mem_check($part->size * 10)) { $out .= html::span('part-notice', rcube_label('messagetoobig'). ' ' . html::a('?_task=mail&_action=get&_download=1&_uid='.$MESSAGE->uid.'&_part='.$part->mime_id .'&_mbox='. urlencode($RCMAIL->storage->get_folder()), rcube_label('download'))); @@ -1438,9 +1448,14 @@ function rcmail_message_part_controls($attrib) $part = $MESSAGE->mime_parts[$part]; $table = new html_table(array('cols' => 3)); - if (!empty($part->filename)) { + $filename = $part->filename; + if (empty($filename) && $attach_prop->mimetype == 'text/html') { + $filename = rcube_label('htmlmessage'); + } + + if (!empty($filename)) { $table->add('title', Q(rcube_label('filename'))); - $table->add('header', Q($part->filename)); + $table->add('header', Q($filename)); $table->add('download-link', html::a(array('href' => './?'.str_replace('_frame=', '_download=', $_SERVER['QUERY_STRING'])), Q(rcube_label('download')))); } -- cgit v1.2.3