summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_imap.php7
-rw-r--r--program/lib/imap.inc6
2 files changed, 3 insertions, 10 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 9b507028c..856858b78 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -1436,10 +1436,7 @@ class rcube_imap
if (!($msg_id = $this->_uid2id($uid)))
return FALSE;
- $body = iil_C_FetchPartHeader($this->conn, $this->mailbox, $msg_id, NULL);
- $body .= iil_C_HandlePartBody($this->conn, $this->mailbox, $msg_id, NULL, 1);
-
- return $body;
+ return iil_C_HandlePartBody($this->conn, $this->mailbox, $msg_id);
}
@@ -1470,8 +1467,6 @@ class rcube_imap
if (!($msg_id = $this->_uid2id($uid)))
return FALSE;
- print iil_C_FetchPartHeader($this->conn, $this->mailbox, $msg_id, NULL);
- flush();
iil_C_HandlePartBody($this->conn, $this->mailbox, $msg_id, NULL, 2);
}
diff --git a/program/lib/imap.inc b/program/lib/imap.inc
index 0f540dde5..65cc5c69f 100644
--- a/program/lib/imap.inc
+++ b/program/lib/imap.inc
@@ -71,6 +71,7 @@
- added BYE response simple support for endless loop prevention
- added 3rd argument in iil_StartsWith* functions
- fix iil_C_FetchPartHeader() in some cases by use of iil_C_HandlePartBody()
+ - allow iil_C_HandlePartBody() to fetch whole message
********************************************************/
@@ -2375,7 +2376,7 @@ function iil_C_FetchPartHeader(&$conn, $mailbox, $id, $part) {
return iil_C_HandlePartBody(&$conn, $mailbox, $id, $part, 1);
}
-function iil_C_HandlePartBody(&$conn, $mailbox, $id, $part, $mode, $file=NULL) {
+function iil_C_HandlePartBody(&$conn, $mailbox, $id, $part='', $mode=1, $file=NULL) {
/* modes:
1: return string (or write to $file pointer)
2: print
@@ -2384,9 +2385,6 @@ function iil_C_HandlePartBody(&$conn, $mailbox, $id, $part, $mode, $file=NULL) {
$fp = $conn->fp;
$result = false;
- if (empty($part)) {
- $part = 'TEXT';
- }
if (iil_C_Select($conn, $mailbox)) {
$reply_key = '* ' . $id;