diff options
author | alecpl <alec@alec.pl> | 2010-05-28 09:38:41 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2010-05-28 09:38:41 +0000 |
commit | d311d809d650e4cab6a5bf0aeb92b97631672c64 (patch) | |
tree | 80ae4736c520debf7fb9e0fd5e2117c3256cc886 /program/include/rcube_imap.php | |
parent | 89e31bec153c28896c177c1d5e652b38d5d8a55f (diff) |
- Fix forwarding of messages with winmail attachments
- Remove some redundant code for winmail handling in get.inc, move tnef_decode() to rcube_message
- Fix handling of uuencoded attachments in message body (#1485839)
- Extend rc_mime_content_type() to work with string buffer
Diffstat (limited to 'program/include/rcube_imap.php')
-rw-r--r-- | program/include/rcube_imap.php | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index cdf346ade..97662e4ba 100644 --- a/program/include/rcube_imap.php +++ b/program/include/rcube_imap.php @@ -472,7 +472,6 @@ class rcube_imap // get message count and store in cache if ($mode == 'UNSEEN') $search_str .= " UNSEEN"; - // get message count using SEARCH // not very performant but more precise (using UNDELETED) // disable THREADS for this request @@ -2034,7 +2033,7 @@ class rcube_imap return true; // convert charset (if text or message part) - if ($o_part->ctype_primary=='text' || $o_part->ctype_primary=='message') { + if ($o_part->ctype_primary == 'text' || $o_part->ctype_primary == 'message') { // assume default if no charset specified if (empty($o_part->charset) || strtolower($o_part->charset) == 'us-ascii') $o_part->charset = $this->default_charset; @@ -3383,43 +3382,6 @@ class rcube_imap /** - * Decode a Microsoft Outlook TNEF part (winmail.dat) - * - * @param object rcube_message_part Message part to decode - * @param string UID of the message - * @return array List of rcube_message_parts extracted from windmail.dat - */ - function tnef_decode(&$part, $uid) - { - if (!isset($part->body)) - $part->body = $this->get_message_part($uid, $part->mime_id, $part); - - require_once('lib/tnef_decoder.inc'); - - $pid = 0; - $tnef_parts = array(); - $tnef_arr = tnef_decode($part->body); - - foreach ($tnef_arr as $winatt) { - $tpart = new rcube_message_part; - $tpart->filename = trim($winatt['name']); - $tpart->encoding = 'stream'; - $tpart->ctype_primary = trim(strtolower($winatt['type0'])); - $tpart->ctype_secondary = trim(strtolower($winatt['type1'])); - $tpart->mimetype = $tpart->ctype_primary . '/' . $tpart->ctype_secondary; - $tpart->mime_id = "winmail." . $part->mime_id . ".$pid"; - $tpart->size = $winatt['size']; - $tpart->body = $winatt['stream']; - - $tnef_parts[] = $tpart; - $pid++; - } - - return $tnef_parts; - } - - - /** * Decode a message header value * * @param string Header value |