summaryrefslogtreecommitdiff
path: root/program/steps/mail/func.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2012-04-13 08:52:02 +0000
committeralecpl <alec@alec.pl>2012-04-13 08:52:02 +0000
commit0c259682f65eaaf23ea4ccb56a706d6baf3007e4 (patch)
treef1491f39189c8a970e7612b9dcc20f9409d7361e /program/steps/mail/func.inc
parentce64332e7a9bf2468eabdb4b789270aebb3e7dc7 (diff)
- Merge devel-framework branch, resolved conflicts
Diffstat (limited to 'program/steps/mail/func.inc')
-rw-r--r--program/steps/mail/func.inc25
1 files changed, 20 insertions, 5 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 8dcd37b20..319166c2d 100644
--- a/program/steps/mail/func.inc
+++ b/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'))));
}