Ignore:
Timestamp:
09/11/12 15:24:49 (12 years ago)
Author:
marcosw
Message:

Ticket #3088 - Implementação parcial desarquivar por drag/drop (mover)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.5.0-expresso1/expressoMail1_2/inc/class.imap_functions.inc.php

    r7184 r7189  
    47514751 
    47524752    function unarchive_mail($params) 
    4753     {            
     4753    {    
     4754        $dest_folder = urldecode($params['folder']); 
     4755        $sources = explode("#@#@#@",$params['source']); 
     4756        $timestamps = explode("#@#@#@",$params['timestamp']); 
     4757        $flags = explode("#@#@#@",$params['flags']); 
     4758        $ids = explode("#@#@#@",$params['id']); 
     4759        $return = array(); 
     4760        $archived = array(); 
     4761        $error = array(); 
     4762 
     4763        foreach($sources as $index=>$src) 
     4764        { 
     4765            if($src!="") 
     4766            { 
     4767                //If it is a MailArchiver incomming data 
     4768                if($params['madata']) 
     4769                    $sourcedec = utf8_decode($src); 
     4770                //Default data 
     4771                else 
     4772                    $sourcedec = $src; 
     4773 
     4774                                $source = $this->treat_base64_from_post($sourcedec); 
     4775                                $insert = $this->insert_email($source,$dest_folder,$timestamps[$index],$flags[$index]); 
     4776                                 
     4777                if($insert['error']) 
     4778                { 
     4779                    $error[] = $ids[$index]; 
     4780                } 
     4781                else  
     4782                { 
     4783                    $archived[] = $ids[$index]; 
     4784                } 
     4785            }else{ 
     4786                $error[] = $ids[$index]; 
     4787            } 
     4788                } 
     4789         
     4790        if (!empty($error)) 
     4791        { 
     4792            $return['error'] = $error; 
     4793        } 
     4794        if (!empty($archived)) 
     4795        { 
     4796            $return['archived'] = $archived; 
     4797        } 
     4798         
     4799        return $return; 
     4800 
     4801        /*       
    47544802        $dest_folder = $params['folder']; 
    47554803        $sources = explode("#@#@#@",$params['source']); 
     
    47664814                        $insert = $this->insert_email($source, mb_convert_encoding( $dest_folder,"ISO-8859-1","UTF-8"), $timestampsactual,$flags[$index]);  
    47674815            } 
    4768         } 
     4816                } 
    47694817        return $insert; 
     4818        */ 
    47704819    } 
    47714820 
     
    54575506            return(false); 
    54585507           
    5459         $a = imap_msgno($this->mbox, $msg_n);           
    5460         $header = @imap_headerinfo($this->mbox, $a, 80, 255); 
     5508        $msgno_imap = imap_msgno($this->mbox, $msg_n);           
     5509        $header = @imap_headerinfo($this->mbox, $msgno_imap, 80, 255); 
    54615510                 
    54625511        if (!is_object($header)) 
Note: See TracChangeset for help on using the changeset viewer.