Changeset 70318e5 in github


Ignore:
Timestamp:
Apr 1, 2010 9:42:39 AM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
cd96fd6
Parents:
1820932
Message:
  • create rcube_mime_struct class on Iloha's MIME (mime.inc) basis
Location:
program
Files:
1 added
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_imap.php

    r6f31b35 r70318e5  
    2020 
    2121*/ 
    22  
    23  
    24 require_once('lib/mime.inc'); 
    25 require_once('lib/tnef_decoder.inc'); 
    2622 
    2723 
     
    16151611        } 
    16161612 
    1617         if (!$structure_str) 
     1613        if (!$structure_str) { 
    16181614            $structure_str = $this->conn->fetchStructureString($this->mailbox, $uid, true); 
    1619         $structure = iml_GetRawStructureArray($structure_str); 
     1615        } 
     1616        $structure = rcube_mime_struct::parseStructure($structure_str); 
    16201617        $struct = false; 
    16211618 
     
    19671964        if (!is_object($o_part)) { 
    19681965            $structure_str = $this->conn->fetchStructureString($this->mailbox, $uid, true);  
    1969             $structure = iml_GetRawStructureArray($structure_str); 
     1966            $structure = new rcube_mime_struct(); 
    19701967            // error or message not found 
    1971             if (empty($structure)) 
     1968            if (!$structure->loadStructure($structure_str)) { 
    19721969                return false; 
    1973  
    1974             $part_type = iml_GetPartTypeCode($structure, $part); 
     1970            } 
     1971 
    19751972            $o_part = new rcube_message_part; 
    1976             $o_part->ctype_primary = $part_type==0 ? 'text' : ($part_type==2 ? 'message' : 'other'); 
    1977             $o_part->encoding = strtolower(iml_GetPartEncodingString($structure, $part)); 
    1978             $o_part->charset = iml_GetPartCharset($structure, $part); 
     1973            $o_part->ctype_primary = strtolower($structure->getPartType($part)); 
     1974            $o_part->encoding      = strtolower($structure->getPartEncoding($part)); 
     1975            $o_part->charset       = $structure->getPartCharset($part); 
    19791976        } 
    19801977       
     
    33323329            $part->body = $this->get_message_part($uid, $part->mime_id, $part); 
    33333330 
     3331        require_once('lib/tnef_decoder.inc'); 
     3332 
    33343333        $pid = 0; 
    33353334        $tnef_parts = array(); 
Note: See TracChangeset for help on using the changeset viewer.