Ignore:
Timestamp:
10/20/09 15:24:08 (15 years ago)
Author:
eduardoalex
Message:

Ticket #656 - funcionalidade de arquivamento programado no expressoMail

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.imap_functions.inc.php

    r1489 r1518  
    1313                'get_info_msgs'                                 => True, 
    1414                'get_folders_list'                              => True, 
    15                 'import_msgs'                                   => True 
     15                'import_msgs'                                   => True, 
     16                'msgs_to_archive'                               => True 
    1617        ); 
    1718 
     
    364365                return $return; 
    365366 
     367        } 
     368         
     369        function msgs_to_archive($params) { 
     370                 
     371                $folder = $params['folder']; 
     372                $all_ids = $this-> get_msgs($folder, 'SORTSIZE', false, 0,-1,-1); 
     373 
     374                $messages_not_to_copy = explode(",",$params['mails']); 
     375                $ids = array(); 
     376                 
     377                foreach($all_ids as $each_id=>$value) { 
     378                        if(!in_array($each_id,$messages_not_to_copy)) 
     379                                array_push($ids,$each_id); 
     380                } 
     381 
     382                if (empty($ids)) 
     383                        return array(); 
     384 
     385                $params = array("folder"=>$folder,"msgs_number"=>implode(",",$ids)); 
     386                 
     387                 
     388                return $this->get_info_msgs($params); 
     389                 
     390                 
    366391        } 
    367392 
     
    20472072                        foreach($imapsort as $iuid) 
    20482073                                $sort[$iuid] = ""; 
    2049                         $slice_array = true; 
     2074                         
     2075                        if ($offsetBegin == -1 && $offsetEnd ==-1 ) 
     2076                                $slice_array = false; 
     2077                        else 
     2078                                $slice_array = true; 
    20502079                } 
    20512080                else 
Note: See TracChangeset for help on using the changeset viewer.