diff options
author | alecpl <alec@alec.pl> | 2011-10-26 11:35:00 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-10-26 11:35:00 +0000 |
commit | 8a6503a23c48470f4bc98a21bde61490e0836bda (patch) | |
tree | 0fa0eb3e525bfa264443d16b79dc441487cc95f3 /program/include/rcube_imap.php | |
parent | 2db2ef3ec95f81a04acd5c143a39f0d8c06c4cae (diff) |
- Fix getting message part data from structure, fixes r5363
Diffstat (limited to 'program/include/rcube_imap.php')
-rw-r--r-- | program/include/rcube_imap.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index 834a63938..d2f954733 100644 --- a/program/include/rcube_imap.php +++ b/program/include/rcube_imap.php @@ -2376,14 +2376,16 @@ class rcube_imap */ function &get_message_part($uid, $part=1, $o_part=NULL, $print=NULL, $fp=NULL, $skip_charset_conv=false) { - // get part encoding if not provided + // get part data if not provided if (!is_object($o_part)) { $structure = $this->conn->getStructure($this->mailbox, $uid, true); + $part_data = rcube_imap_generic::getStructurePartData($structure, $part); $o_part = new rcube_message_part; - $o_part->ctype_primary = strtolower(rcube_imap_generic::getStructurePartType($structure, $part)); - $o_part->encoding = strtolower(rcube_imap_generic::getStructurePartEncoding($structure, $part)); - $o_part->charset = rcube_imap_generic::getStructurePartCharset($structure, $part); + $o_part->ctype_primary = $part_data['type']; + $o_part->encoding = $part_data['encoding']; + $o_part->charset = $part_data['charset']; + $o_part->size = $part_data['size']; } if ($o_part && $o_part->size) { |