Changeset 5921 for trunk/phpgwapi


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/phpgwapi
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/inc/adodb/drivers/adodb-sybase.inc.php

    r34 r5921  
    377377         
    378378                //Dec 30 2000 12:00AM 
    379                 if (!ereg( "([A-Za-z]{3})[-/\. ]+([0-9]{1,2})[-/\. ]+([0-9]{4})" 
     379                if (!preg_match('/([A-Za-z]{3})[-\/\. ]+([0-9]{1,2})[-\/\. ]+([0-9]{4})/' 
    380380                        ,$v, $rr)) return parent::UnixDate($v); 
    381381                         
     
    394394                //11.02.2001 Toni Tunkkari toni.tunkkari@finebyte.com 
    395395                //Changed [0-9] to [0-9 ] in day conversion 
    396                 if (!ereg( "([A-Za-z]{3})[-/\. ]([0-9 ]{1,2})[-/\. ]([0-9]{4}) +([0-9]{1,2}):([0-9]{1,2}) *([apAP]{0,1})" 
     396                if (!preg_match('/([A-Za-z]{3})[-\/\. ]([0-9 ]{1,2})[-\/\. ]([0-9]{4}) +([0-9]{1,2}):([0-9]{1,2}) *([apAP]{0,1})/' 
    397397                        ,$v, $rr)) return parent::UnixTimeStamp($v); 
    398398                if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; 
  • trunk/phpgwapi/inc/class.soapmsg.inc.php

    r5912 r5921  
    144144        /* 
    145145                        // if response is a proper http response, and is not a 200 
    146                         if(preg_match('/^HTTP/',$clean_data) && !ereg("200$", $clean_data)) 
     146                        if(preg_match('/^HTTP\/',$clean_data) && !preg_match('\/200$\/', $clean_data)) 
    147147                        { 
    148148                                // get error data 
  • trunk/phpgwapi/inc/class.vfs_dav.inc.php

    r5912 r5921  
    519519                        { 
    520520                                $base_sep = $sep; 
    521                                 if (ereg ("^$this->basedir" . $sep, $string)) 
     521                                if (preg_match("/^$this->basedir/" . $sep, $string)) 
    522522                                { 
    523523                                        $base = $this->basedir . $sep; 
     
    585585                                while (list ($num, $link_info) = each ($this->linked_dirs)) 
    586586                                { 
    587                                         if (ereg ("^$link_info[directory]/$link_info[name](/|$)", $rarray['fake_full_path'])) 
     587                                        if (preg_match("/^$link_info[directory]\/$link_info[name](\/|$)/", $rarray['fake_full_path'])) 
    588588                                        { 
    589589                                                $rarray['real_full_path'] = ereg_replace ("^$this->basedir", '', $rarray['real_full_path']); 
     
    764764 
    765765                        /* Let's not return // */ 
    766                         while (ereg ($sep . $sep, $basedir)) 
     766                        while (preg_match("/$sep"."$sep/", $basedir)) 
    767767                        { 
    768768                                $basedir = ereg_replace ($sep . $sep, $sep, $basedir); 
     
    17761776                                        'relatives'     => array ($f->mask) 
    17771777                                ) == 'Directory')) 
    1778                                 && ereg ("^$f->fake_full_path", $t->fake_full_path) 
     1778                                && preg_match("/^$f->fake_full_path/", $t->fake_full_path) 
    17791779                        ) 
    17801780                        { 
     
    20482048 
    20492049                        /* We don't allow /'s in dir names, of course */ 
    2050                         if (ereg ('/', $p->fake_name)) 
     2050                        if (preg_match('/\//', $p->fake_name)) 
    20512051                        { 
    20522052                                return False; 
     
    22792279                                ); 
    22802280                        } 
    2281                         elseif (ereg("+^$this->fakebase\/(.*)$+U", $p->fake_full_path, $matches)) 
     2281                        elseif (preg_match("/+^$this->fakebase\/(.*)$+U/", $p->fake_full_path, $matches)) 
    22822282                        { 
    22832283                                $set_attributes_array = Array( 
     
    25022502                                */ 
    25032503/* 
    2504                                 if (@!ereg ('^' . $file_array['directory'], $p->fake_full_path)) 
     2504                                if (@!preg_match("/^$file_array['directory']/", $p->fake_full_path)) 
    25052505                                { 
    25062506                                        continue; 
  • trunk/phpgwapi/inc/class.vfs_shared.inc.php

    r5912 r5921  
    759759 
    760760                        /* Let's not return // */ 
    761                         while (ereg ($sep . $sep, $basedir)) 
     761                        while (preg_match("/$sep"."$sep/", $basedir)) 
    762762                        { 
    763763                                $basedir = ereg_replace ($sep . $sep, $sep, $basedir); 
     
    10281028                                while (list ($num, $link_info) = each ($this->linked_dirs)) 
    10291029                                { 
    1030                                         if (ereg ("^$link_info[directory]/$link_info[name](/|$)", $rarray['fake_full_path'])) 
     1030                                        if (preg_match("/^$link_info[directory]\/$link_info[name](\/|$)/", $rarray['fake_full_path'])) 
    10311031                                        { 
    10321032                                                $rarray['real_full_path'] = ereg_replace ("^$this->basedir", '', $rarray['real_full_path']); 
  • trunk/phpgwapi/inc/class.vfs_sql.inc.php

    r5164 r5921  
    15221522                                        'relatives'     => array ($f->mask) 
    15231523                                ) == 'Directory')) 
    1524                                 && ereg ("^$f->fake_full_path", $t->fake_full_path) 
     1524                                && preg_match("/^$f->fake_full_path/", $t->fake_full_path) 
    15251525                        ) 
    15261526                        { 
     
    18891889 
    18901890                        /* We don't allow /'s in dir names, of course */ 
    1891                         if (ereg ("/", $p->fake_name)) 
     1891                        if (preg_match('/\//', $p->fake_name)) 
    18921892                        { 
    18931893                                return False; 
     
    24912491                                */ 
    24922492/* 
    2493                                 if (@!ereg ('^' . $file_array['directory'], $p->fake_full_path)) 
     2493                                if (@!preg_match("/^$file_array['directory']/", $p->fake_full_path)) 
    24942494                                { 
    24952495                                        continue; 
  • trunk/phpgwapi/inc/fpdf/tutorial/tuto6.php

    r2 r5921  
    4848                                $attr=array(); 
    4949                                foreach($a2 as $v) 
    50                                         if(ereg('^([^=]*)=["\']?([^"\']*)["\']?$',$v,$a3)) 
     50                                        if(preg_match('/^([^=]*)=["\']?([^"\']*)["\']?$/',$v,$a3)) 
    5151                                                $attr[strtoupper($a3[1])]=$a3[2]; 
    5252                                $this->OpenTag($tag,$attr); 
  • trunk/phpgwapi/templates/news/login_news.php

    r5159 r5921  
    343343        foreach($_GET as $name => $value) 
    344344        { 
    345                 if(ereg('phpgw_',$name)) 
     345                if(preg_match('/phpgw_/',$name)) 
    346346                { 
    347347                        $extra_vars .= '&' . $name . '=' . urlencode($value); 
Note: See TracChangeset for help on using the changeset viewer.