Ignore:
Timestamp:
03/19/12 11:05:19 (12 years ago)
Author:
thiago
Message:

Ticket #2486 - Correção do bug ao abrir os email no anexar mensagem.

File:
1 edited

Legend:

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

    r5745 r5748  
    158158        function get_range_msgs2($params) 
    159159        {        
    160                 include '../prototype/api/controller.php'; 
     160                include_once '../prototype/api/controller.php'; 
    161161            // Free others requests 
    162162            session_write_close(); 
     
    195195                                             
    196196                                    $return[$i] = $this->get_info_head_msg( $msg_number , $sample ); 
     197 
     198                                                                        $filter = array('AND', array('=', 'folderName', $folder), array('=','messageNumber', $msg_number)); 
     199                                                                        $followupflagged = Controller::find( 
     200                                                                                array('concept' => 'followupflagged'), 
     201                                                                                false,  
     202                                                                                array('filter' => $filter, 'criteria' => array('deepness' => '2')) 
     203                                                                        ); 
     204 
     205                                                                        if(isset($followupflagged[0]['followupflagId'])) 
     206                                                                        { 
     207                                                                                $followupflag = Controller::read( array( 'concept' => 'followupflag', 'id' => $followupflagged[0]['followupflagId'] ));      
     208                                                                                $followupflagged[0]['followupflag'] = $followupflag; 
     209                                                                                $return[$i]['followupflagged'] = $followupflagged[0]; 
     210 
     211                                                                        } 
     212 
     213                                                                        $labeleds = Controller::find( 
     214                                                                                array('concept' => 'labeled'), 
     215                                                                                false,  
     216                                                                                array('filter' => $filter, 'criteria' => array('deepness' => '2')) 
     217                                                                        ); 
    197218                                                                         
    198                                                                          
    199                                                                 $filter = array('AND', array('=', 'folderName', $folder), array('=','messageNumber', $msg_number)); 
    200                                                                 $followupflagged = Controller::find( 
    201                                                                         array('concept' => 'followupflagged'), 
    202                                                                         false,  
    203                                                                         array('filter' => $filter, 'criteria' => array('deepness' => '2')) 
    204                                                                 ); 
    205  
    206                                                                 if(isset($followupflagged[0]['followupflagId'])) 
    207                                                                 { 
    208                                                                         $followupflag = Controller::read( array( 'concept' => 'followupflag', 'id' => $followupflagged[0]['followupflagId'] ));      
    209                                                                         $followupflagged[0]['followupflag'] = $followupflag; 
    210                                                                         $return[$i]['followupflagged'] = $followupflagged[0]; 
    211  
    212                                                                 } 
    213  
    214                                                                 $labeleds = Controller::find( 
    215                                                                         array('concept' => 'labeled'), 
    216                                                                         false,  
    217                                                                         array('filter' => $filter, 'criteria' => array('deepness' => '2')) 
    218                                                                 ); 
    219  
    220                                                                  
    221                                                                 if(isset($labeleds) && count($labeleds) > 0 && $labeleds){ 
    222                                                                         $return[$i]['labels'] = array(); 
    223  
    224                                                                         foreach ($labeleds as $e){ 
    225                                                                          
    226                                                                                 $labels = Controller::read( array( 'concept' => 'label', 'id' =>  $e['labelId']));      
    227                                                                                 $return[$i]['labels'][] = $labels; 
    228                                                                         }        
    229                                                                 } 
    230                               $i++; 
     219                                                                        if(isset($labeleds) && count($labeleds) > 0 && $labeleds){ 
     220                                                                                $return[$i]['labels'] = array(); 
     221 
     222                                                                                foreach ($labeleds as $e){ 
     223                                                                                 
     224                                                                                        $labels = Controller::read( array( 'concept' => 'label', 'id' =>  $e['labelId']));      
     225                                                                                        $return[$i]['labels'][] = $labels; 
     226                                                                                }        
     227                                                                        } 
     228                                    $i++; 
    231229                            } 
    232230                    } 
Note: See TracChangeset for help on using the changeset viewer.