Ignore:
Timestamp:
10/08/13 16:20:46 (11 years ago)
Author:
douglas
Message:

Ticket #0000 - Copiadas as alterações do Trunk. Versão final 2.5.1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/expressoMail1_2/inc/class.exporteml.inc.php

    r7673 r8232  
    150150        } 
    151151 
    152 function export_all_byLocalFolder($params){ 
    153         $error = false; 
    154  
    155         if(empty($params['messages'])){ 
    156             $file["empty_folder"] = true; 
    157         } else { 
    158             foreach($params['messages'] as $eachMsg){ 
    159                $header = ""; 
    160                $body = ""; 
    161                $tempDir = $this->tempDir; 
    162  
    163                $this->get_header_byLocalFolder($eachMsg, $header); 
    164                $this->get_body_byLocalFolder($eachMsg, $body); 
    165                $sEMLData    = $this->parseEml($header, $body); 
    166                $fileName   = $this->createFileEml_by_localFolder($sEMLData, $tempDir,$eachMsg['msg_number']); 
    167  
    168                if(!$fileName){ 
    169                    $error = true; 
    170                    break; 
    171                } else  
    172                    $fileNames .= "\"".$fileName."\" "; 
    173             } 
    174  
    175             $nameFileZip = 'False';          
    176             if($fileNames && !$error) {          
    177                 $nameFileZip = $this->createFileZip($fileNames, $tempDir); 
    178                 ($nameFileZip) ? ($file = $tempDir.'/'.$nameFileZip) : ($file = false); 
    179             } else  
    180                 $file = false; 
    181         } 
    182         
    183        return $file; 
    184  
    185 } 
    186  
    187 function get_header_byLocalFolder($eachMsg, &$header){ 
    188     $header = <<<header 
    189         MIME-Version: 1.0 
    190         Content-Type: text/html; charset=ISO-8859-1 
    191         Content-Transfer-Encoding: quoted-printable 
    192         From: "{$eachMsg['from']['name']}" <{$eachMsg['from']['email']}> 
    193         To: {$eachMsg['to']['email']} 
    194         Subject: {$eachMsg['subject']} 
    195         Message-Id: {$eachMsg['msg_number']} 
    196         Date: {$eachMsg['date']} 
    197 header; 
    198 } 
    199  
    200 function get_body_byLocalFolder($eachMsg, &$body){ 
    201     $body = $eachMsg['msg_sample']['body']; 
    202 } 
    203152 
    204153function export_all($params){ 
Note: See TracChangeset for help on using the changeset viewer.