Ignore:
Timestamp:
09/10/12 12:05:54 (12 years ago)
Author:
marcosw
Message:

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

File:
1 edited

Legend:

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

    r7157 r7184  
    54445444        return($this->functions->CalculateDateOffset()); 
    54455445    } 
    5446      
     5446 
    54475447    //MailArchiver -> get message flags only, invoked at archive operation 
     5448    //Marcosw início - modificação da estrutura da função, removendo estr. de repetição desnecessária 
    54485449    function get_msg_flags($args){        
    54495450                $msg_folder = $args['folder']; 
    54505451        $msg_n = $args['msg_number']; 
    54515452         
    5452         $arr_msg = explode(",", $msg_n); 
    5453         
    5454         for($i=0; $i<count($arr_msg); $i++){ 
    5455                          
    5456             if(!$this->mbox || !is_resource($this->mbox)) 
    5457                 $this->mbox = $this->open_mbox($msg_folder); 
    5458          
    5459             if(!is_resource($this->mbox)) 
    5460                 return(false); 
    5461                         
    5462             $header = @imap_headerinfo($this->mbox, imap_msgno($this->mbox, $arr_msg[$i]), 80, 255); 
    5463                  
    5464             if (!is_object($header)) 
    5465                 return false; 
    5466  
    5467             $taglist[$i]["msgid"] = $msg_n; 
    5468             $taglist[$i]["unseen"] = $header->Unseen; 
    5469             $taglist[$i]["recent"] = $header->Recent; 
    5470             $taglist[$i]["flagged"] = $header->Flagged; 
    5471             $taglist[$i]["draft"] = $header->Draft; 
    5472             $taglist[$i]["answered"] = $header->Answered; 
    5473             $taglist[$i]["deleted"] = $header->Deleted; 
    5474          
    5475             if($header->Answered =='A' && $header->Draft == 'X') 
    5476                 $taglist[$i]['forwarded'] = 'F'; 
    5477             else 
    5478                 $taglist[$i]['forwarded'] = ' '; 
    5479          
    5480             if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_important_flag']) { 
    5481                 $flag = preg_match('/importance *: *(.*)\r/i',imap_fetchheader($this->mbox, imap_msgno($this->mbox, $arr_msg[$i])),$importance); 
    5482                 $taglist[$i]["importance"] = $flag==0?"Normal":$importance[1]; 
    5483             } 
     5453        if(!$this->mbox || !is_resource($this->mbox)) 
     5454            $this->mbox = $this->open_mbox($msg_folder); 
     5455     
     5456        if(!is_resource($this->mbox)) 
     5457            return(false); 
     5458           
     5459        $a = imap_msgno($this->mbox, $msg_n);           
     5460        $header = @imap_headerinfo($this->mbox, $a, 80, 255); 
     5461                 
     5462        if (!is_object($header)) 
     5463            return false; 
     5464 
     5465        $taglist["msgid"] = $msg_n; 
     5466        $taglist["unseen"] = $header->Unseen; 
     5467        $taglist["recent"] = $header->Recent; 
     5468        $taglist["flagged"] = $header->Flagged; 
     5469        $taglist["draft"] = $header->Draft; 
     5470        $taglist["answered"] = $header->Answered; 
     5471        $taglist["deleted"] = $header->Deleted; 
     5472     
     5473        if($header->Answered =='A' && $header->Draft == 'X') 
     5474            $taglist['forwarded'] = 'F'; 
     5475        else 
     5476            $taglist['forwarded'] = ' '; 
     5477     
     5478        if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_important_flag']) { 
     5479            $flag = preg_match('/importance *: *(.*)\r/i',imap_fetchheader($this->mbox, imap_msgno($this->mbox, $msg_n)),$importance); 
     5480            $taglist["importance"] = $flag==0?"Normal":$importance[1]; 
    54845481        } 
     5482 
    54855483                return $taglist;         
    54865484    }     
     5485    // Marcosw fim 
    54875486        /* Airton 
    54885487         * Fim dos métodos  
Note: See TracChangeset for help on using the changeset viewer.