summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/func.inc6
-rw-r--r--program/steps/mail/get.inc11
2 files changed, 10 insertions, 7 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index f5165399b..70493766b 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -1290,7 +1290,7 @@ function rcmail_part_image_type($part)
// Content-Type: image/*...
if (preg_match($mime_regex, $part->mimetype)) {
- return $part->mimetype;
+ return rcmail_fix_mimetype($part->mimetype);
}
// Many clients use application/octet-stream, we'll detect mimetype
@@ -1900,6 +1900,10 @@ function rcmail_fix_mimetype($name)
if (preg_match('/^application\/pdf.+/', $name))
$name = 'application/pdf';
+ // treat image/pjpeg as image/jpeg
+ else if (preg_match('/^image\/p?jpe?g$/', $name))
+ $name = 'image/jpeg';
+
return $name;
}
diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc
index 314a437e7..803716d61 100644
--- a/program/steps/mail/get.inc
+++ b/program/steps/mail/get.inc
@@ -166,12 +166,11 @@ else if (strlen($pid = get_input_value('_part', RCUBE_INPUT_GET))) {
'vars' => array('expected' => "$mimetype (.$file_extension)", 'detected' => "$real_mimetype (.$extensions[0])")
)) .
html::p('buttons',
- html::tag('button', null,
- html::a(array(
- 'href' => $RCMAIL->url(array_merge($_GET, array('_nocheck' => 1))),
- 'style' => 'text-decoration:none;color:#000',
- ), rcube_label('showanyway')))
- ))
+ html::a(array(
+ 'href' => $RCMAIL->url(array_merge($_GET, array('_nocheck' => 1))),
+ 'style' => 'text-decoration:none;color:#000',
+ ), html::tag('button', null, rcube_label('showanyway'))))
+ )
)));
exit;
}