summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--program/include/rcube_imap.php2
-rw-r--r--program/include/rcube_imap_generic.php3
2 files changed, 3 insertions, 2 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index a89fd164d..f2645f60f 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -2074,7 +2074,7 @@ class rcube_imap extends rcube_storage
if ($o_part && $o_part->size) {
$body = $this->conn->handlePartBody($this->folder, $uid, true,
- $part ? $part : 'TEXT', $o_part->encoding, $print, $fp);
+ $part ? $part : 'TEXT', $o_part->encoding, $print, $fp, $o_part->ctype_primary == 'text');
}
if ($fp || $print) {
diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php
index 651de9d97..bc7ecfc37 100644
--- a/program/include/rcube_imap_generic.php
+++ b/program/include/rcube_imap_generic.php
@@ -2379,7 +2379,7 @@ class rcube_imap_generic
return $this->handlePartBody($mailbox, $id, $is_uid, $part);
}
- function handlePartBody($mailbox, $id, $is_uid=false, $part='', $encoding=NULL, $print=NULL, $file=NULL, $formatted=true)
+ function handlePartBody($mailbox, $id, $is_uid=false, $part='', $encoding=NULL, $print=NULL, $file=NULL, $formatted=false)
{
if (!$this->select($mailbox)) {
return false;
@@ -2417,6 +2417,7 @@ class rcube_imap_generic
}
if ($binary) {
+ // WARNING: Use $formatting argument with care, this may break binary data stream
$mode = -1;
}