summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2012-11-21 10:48:21 +0100
committerThomas Bruederli <thomas@roundcube.net>2012-11-21 10:48:21 +0100
commitb81e7e91a958cb7432ef3be67de380b868ab731b (patch)
tree9e9bcd71c32979fc2f05fea5829cae11fa0465a0 /program/steps/mail
parent90ff4ca9518416852136a2abfda9a2eb412c5608 (diff)
Consider filename extension to detect image attachments of type application/octet-stream
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/func.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index e789950e4..9864ca7a0 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -1198,7 +1198,7 @@ function rcmail_message_body($attrib)
}
// Content-Type: image/*...
- if (rcmail_part_image_type($attach_prop)) {
+ if ($mimetype = rcmail_part_image_type($attach_prop)) {
// display thumbnails
if ($thumbnail_size) {
$show_link = array(
@@ -1207,7 +1207,7 @@ function rcmail_message_body($attrib)
'return %s.command(\'load-attachment\',{part:\'%s\', mimetype:\'%s\'},this)',
JS_OBJECT_NAME,
$attach_prop->mime_id,
- rcmail_fix_mimetype($attach_prop->mimetype))
+ $mimetype)
);
$out .= html::p('image-attachment',
html::a($show_link + array('class' => 'image-link', 'style' => sprintf('width:%dpx', $thumbnail_size)),
@@ -1222,7 +1222,7 @@ function rcmail_message_body($attrib)
html::span('image-filename', Q($attach_prop->filename)) .
html::span('image-filesize', Q($RCMAIL->message_part_size($attach_prop))) .
html::span('attachment-links',
- (in_array($attach_prop->mimetype, $client_mimetypes) ? html::a($show_link, rcube_label('showattachment')) . '&nbsp;' : '') .
+ (in_array($mimetype, $client_mimetypes) ? html::a($show_link, rcube_label('showattachment')) . '&nbsp;' : '') .
html::a($show_link['href'] . '&_download=1', rcube_label('download'))
) .
html::br(array('style' => 'clear:both'))