Ignore:
Timestamp:
04/18/11 17:39:42 (13 years ago)
Author:
rafaelraymundo
Message:

Ticket #1726 - Pesquisar apenas msgs não importantes, r4067

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.0.1/expressoMail1_2/inc/class.imap_functions.inc.php

    r4050 r4068  
    35093509                                        } 
    35103510                                } 
    3511                                 else 
    3512                                 { 
     3511                                else{ 
    35133512                                        $search_criteria = imap_search($mbox_stream, $filter, SE_UID); 
    3514                                          
     3513                                        if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_important_flag']) 
     3514                                        { 
     3515                                            if((!strpos($filter,"FLAGGED") === false) || (!strpos($filter,"UNFLAGGED") === false)) 
     3516                                            { 
     3517                                                $num_msgs = imap_num_msg($mbox_stream); 
     3518                                                $flagged_msgs = array(); 
     3519                                                for ($i=$num_msgs; $i>0; $i--) 
     3520                                                { 
     3521                                                        $iuid = @imap_uid($this->mbox,$i); 
     3522                                                        $header = $this->get_header($iuid); 
     3523                                                        if(trim($header->Flagged)) 
     3524                                                        { 
     3525                                                                $flagged_msgs[$i] = $iuid; 
     3526                                                        } 
     3527                                                } 
     3528                                                if((count($flagged_msgs) >0) && (strpos($filter,"UNFLAGGED") === false)) 
     3529                                                { 
     3530                                                    $arry_diff = is_array($search_criteria) ? array_diff($flagged_msgs,$search_criteria):$flagged_msgs; 
     3531                                                    foreach($arry_diff as $msg) 
     3532                                                    { 
     3533                                                        $search_criteria[] = $msg; 
     3534                                                    } 
     3535                                                } 
     3536                                                else if((count($flagged_msgs) >0) && (is_array($search_criteria)) && (!strpos($filter,"UNFLAGGED") === false)) 
     3537                                                { 
     3538                                                    $search_criteria = array_diff($search_criteria,$flagged_msgs); 
     3539                                                } 
     3540                                            } 
     3541                                        } 
     3542 
    35153543                                        if( is_array( $search_criteria) ) 
    35163544                                        { 
Note: See TracChangeset for help on using the changeset viewer.