summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-11-12 10:41:22 +0100
committerAleksander Machniak <alec@alec.pl>2012-11-12 10:41:22 +0100
commit2a5afe1cdeb177642d10567687df460fd220802d (patch)
tree04362d69fcd79801387e501b27cdf3e8b8a2330a
parent4340d5e63424ffdea2788701c5539c9cdc162eda (diff)
BINARY extension can't be used with $formatting=true on binary content
-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;
}