Changeset 4468


Ignore:
Timestamp:
05/20/11 10:57:43 (13 years ago)
Author:
airton
Message:

Ticket #1820 - Aumenta a data passada para pesquisa em 1 dia - r4430

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.2.0.2/expressoMail1_2/inc/class.imap_functions.inc.php

    r4457 r4468  
    35663566                "SOZsozYYuAAAAACEEEEIIIIINOOOOOUUUUUsaaaaaceeeeiiiiinooooouuuuuyy"); 
    35673567        } 
    3568  
    3569         function make_search_date($date){ 
    3570  
    3571             $months = array( 
    3572                 1   => 'jan', 
    3573                 2   => 'feb', 
    3574                 3   => 'mar', 
    3575                 4   => 'apr', 
    3576                 5   => 'may', 
    3577                 6   => 'jun', 
    3578                 7   => 'jul', 
    3579                 8   => 'aug', 
    3580                 9   => 'sep', 
    3581                 10  => 'oct', 
    3582                 11  => 'nov', 
    3583                 12  => 'dec' 
    3584             ); 
     3568         
     3569        function make_search_date($date,$before = false){  
    35853570 
    35863571            //TODO: Adaptar a data de acordo com o locale do sistema. 
    35873572            list($day,$month,$year) = explode("/", $date); 
    3588             $search_date = $day."-".$months[intval($month)]."-".$year; 
     3573                        $before?$day=(int)$day+1:$day=(int)$day;  
     3574                $timestamp = mktime(0,0,0,(int)$month,$day,(int)$year);  
     3575                $search_date = date('d-M-Y',$timestamp); 
    35893576            return $search_date; 
    35903577 
    3591         } 
     3578    } 
    35923579 
    35933580        function search_msg( $params = false ) 
     
    36313618                                                            $filter .= '"'.$filter_array[1].'"'; 
    36323619                                                        } 
    3633                                                         else 
     3620                                                        if(trim($filter_array[0]) == 'BEFORE' ) 
    36343621                                                        { 
    3635                                                                 $filter .= '"'.$this->make_search_date($filter_array[1]).'"'; 
    3636                                                         } 
     3622                                                                $filter .= '"'.$this->make_search_date($filter_array[1],true).'"';  
     3623                                    }else{  
     3624                                                                $filter .= '"'.$this->make_search_date($filter_array[1]).'"';  
     3625                                }  
    36373626                                                } 
    36383627                                        } 
Note: See TracChangeset for help on using the changeset viewer.