Changeset 6037 for trunk/calendar


Ignore:
Timestamp:
04/26/12 11:43:10 (12 years ago)
Author:
marcosw
Message:

Ticket #2398 - Compatibilizacao com PHP-5.3 em alguns módulos do expresso

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/calendar/inc/class.boicalendar.inc.php

    r5921 r6037  
    23832383                                        //                                              if(preg_match('/D/', $_f_['day_raw'])) 
    23842384                                        if (strstr($_f_['day_raw'], 'D')) { 
    2385                                                         $dur['days'] = eregi_replace("([0-9]+)D(.*)", "\\1", $_f_['day_raw']); 
     2385                                                        $dur['days'] = preg_replace('/([0-9]+)D(.*)/i', '\\1', $_f_['day_raw']); 
    23862386                                                } 
    23872387 
     
    23892389                                        //                                              if(preg_match('/W/', $_f_["day_raw"])) 
    23902390                                        if (strstr($_f_['day_raw'], 'W')) { 
    2391                                                         $dur['weeks'] = eregi_replace("([^|.*]+D)?([0-9]+)W", "\\2", $_f_['day_raw']); 
     2391                                                        $dur['weeks'] = preg_replace('/([^|.*]+D)?([0-9]+)W/i', '\\2', $_f_['day_raw']); 
    23922392                                                } 
    23932393                                        } 
     
    23982398                                        //                                              if(preg_match('/H/', $_f_["time_raw"])) 
    23992399                                        if (strstr($_f_['time_raw'], 'H')) { 
    2400                                                         $dur['hours'] = eregi_replace("([0-9]+)H(.*)", "\\1", $_f_['time_raw']); 
     2400                                                        $dur['hours'] = preg_replace('/([0-9]+)H(.*)/i', '\\1', $_f_['time_raw']); 
    24012401                                                } 
    24022402 
     
    24052405                                        //                                              if(preg_match('/M/', $_f_["time_raw"])) 
    24062406                                        if (strstr($_f_['time_raw'], 'M')) { 
    2407                                                         $dur['minutes'] = eregi_replace("([^|.*]+H)?([0-9]+)M(.*)", "\\2", $_f_['time_raw']); 
     2407                                                        $dur['minutes'] = preg_replace('/([^|.*]+H)?([0-9]+)M(.*)/i', '\\2', $_f_['time_raw']); 
    24082408                                                } 
    24092409 
     
    24122412                                        //                                              if(preg_match('/S/', $_f_["time_raw"]) ) 
    24132413                                        if (strstr($_f_['time_raw'], 'S')) { 
    2414                                                         $dur['seconds'] = eregi_replace("([^|.*]+M)?([0-9]+)S(.*)", "\\2", $_f_['time_raw']); 
     2414                                                        $dur['seconds'] = preg_replace('/([^|.*]+M)?([0-9]+)S(.*)/i', '\\2', $_f_['time_raw']); 
    24152415                                                } 
    24162416                                        } 
Note: See TracChangeset for help on using the changeset viewer.