Ignore:
Timestamp:
04/11/12 17:21:30 (12 years ago)
Author:
marcosw
Message:

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

Location:
trunk/workflow/inc/local
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/workflow/inc/local/classes/class.wf_date.php

    r795 r5921  
    7676        function isEuroDate($date, &$regs) { 
    7777                $date = trim($date); 
    78                 if (ereg("^([0-9]{1,2})(/|\-|\.)([0-9]{1,2})(/|\-|\.)([0-9]{4})([[:space:]]([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?)?$", $date, $matches)) { 
     78                if (preg_match('/^([0-9]{1,2})(\/|\-|\.)([0-9]{1,2})(\/|\-|\.)([0-9]{4})([[:space:]]([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?)?$/', $date, $matches)) { 
    7979                        $regs = array( 
    8080                                $matches[0],  
     
    9696        function isUsDate($date, &$regs) { 
    9797                $date = trim($date); 
    98                 if (ereg("^([0-9]{4})(/|\-|\.)([0-9]{1,2})(/|\-|\.)([0-9]{1,2})([[:space:]]([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?)?$", $date, $matches)) { 
     98                if (preg_match('/^([0-9]{4})(\/|\-|\.)([0-9]{1,2})(\/|\-|\.)([0-9]{1,2})([[:space:]]([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?)?$/', $date, $matches)) { 
    9999                        $regs = array( 
    100100                                $matches[0],  
     
    116116        function isSqlDate($date, &$regs) { 
    117117                $date = trim($date); 
    118                 if (ereg("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})([[:space:]]([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?)?$", $date, $matches)) { 
     118                if (preg_match('/^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})([[:space:]]([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?)?$/', $date, $matches)) { 
    119119                        $regs = array( 
    120120                                $matches[0],  
  • trunk/workflow/inc/local/classes/class.wf_regex.php

    r795 r5921  
    523523        { 
    524524                if ( $caseSensitive ) 
    525                         return( ereg( $pattern, (string) $input ) ); 
     525                        return( preg_match("/$pattern/", (string) $input ) ); 
    526526                else 
    527527                        return( eregi( $pattern, (string) $input ) ); 
  • trunk/workflow/inc/local/functions/function.wf_handle_download.php

    r795 r5921  
    3535                        if (isset($fileResult['filename']) && isset($fileResult['content'])) 
    3636                        { 
    37                                         if (ereg('Opera(/| )([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT'])) 
     37                                        if (preg_match('/Opera(\/| )([0-9].[0-9]{1,2})/', $_SERVER['HTTP_USER_AGENT'])) 
    3838                                        $UserBrowser = "Opera"; 
    39                                 elseif (ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT'])) 
     39                                elseif (preg_match('/MSIE ([0-9].[0-9]{1,2})/', $_SERVER['HTTP_USER_AGENT'])) 
    4040                                        $UserBrowser = "IE"; 
    4141                                        else 
Note: See TracChangeset for help on using the changeset viewer.