Ignore:
Timestamp:
05/16/12 13:37:35 (12 years ago)
Author:
cristiano
Message:

Ticket #2314 - Problemas na troca de pastas funcionalidade anexar mensagem

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/services/ImapServiceAdapter.php

    r6171 r6212  
    6565    public function find( $URI, $justthese = false, $criteria = false ) 
    6666        {  
    67          
     67 
    6868                $context = isset($justthese['context']) ? $justthese['context'] : '' ; 
    6969 
     
    9494                                $sord  = isset($criteria['sord']) ? $criteria['sord'] : ''; //{desc} get the direction 
    9595 
    96                                 $filter = $criteria['filter']; 
     96                                $filter =  isset($criteria['filter']) ? $criteria['filter'] : ''; 
    9797 
    9898                                if( !$sidx ) $sidx = 1; 
    9999 
    100                                 $folder_name =  isset($URI['folder']) ?  $URI['folder'] : str_replace( '.', $this->imap_delimiter, $context ); 
     100                                $folder_name =  isset($URI['folder']) ?  $URI['folder'] : str_replace( '.', $this->imap_delimiter, isset($context['folder']) ?  $context['folder'] : 'INBOX'); 
    101101                         
    102102                                $count = imap_num_msg( $this->open_mbox( $folder_name ) ); 
     
    121121                                if ( $justthese )  
    122122                                { 
    123                                         if ($justthese[0] == 'messageId') { 
     123                                        if (isset($justthese[0]) && $justthese[0] == 'messageId') { 
    124124                                                $map = array( 
    125125                                                        'folderName' => array(), 
     
    284284                                                        $messagesLabeleds = imap_search($this->mbox, 'UNDELETED KEYWORD "$Label'.$label.'"', SE_UID); 
    285285                                                         
     286                                                        if(is_array($messagesLabeleds)) 
    286287                                                        foreach ($messagesLabeleds as $messageLabeled) { 
    287288                                                                if (count($map['messageNumber']) > 0 && !in_array($messageLabeled, $map['messageNumber'])) 
Note: See TracChangeset for help on using the changeset viewer.