Ignore:
Timestamp:
04/11/12 12:04:21 (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/phpgwapi/inc/xml_functions.inc.php

    r5509 r5912  
    151151                while($i<sizeof($top)) 
    152152                { 
    153                         if (ereg("^([#a-zA-Z0-9]+);", $top[$i], $regs)) 
     153                        if (preg_match('/^([#a-zA-Z0-9]+);/', $top[$i], $regs)) 
    154154                        { 
    155155                                $op .= ereg_replace("^[#a-zA-Z0-9]+;", 
     
    178178                        return $GLOBALS['xmlEntities'][strtolower($ent)]; 
    179179                } 
    180                 if (ereg("^#([0-9]+)$", $ent, $regs)) 
     180                if (preg_match('/^#([0-9]+)$/', $ent, $regs)) 
    181181                { 
    182182                        return chr($regs[1]); 
     
    313313                                        // we have an I4, INT or a DOUBLE 
    314314                                        // we must check that only 0123456789-.<space> are characters here 
    315                                         if (!ereg("^\-?[0123456789 \t\.]+$", $GLOBALS['_xh'][$parser]['ac'])) 
     315                                        if (!preg_match('/^\-?[0123456789 \t\.]+$/', $GLOBALS['_xh'][$parser]['ac'])) 
    316316                                        { 
    317317                                                // TODO: find a better way of throwing an error 
     
    387387        function xmlrpc_cd($parser, $data) 
    388388        { 
    389                 //if (ereg("^[\n\r \t]+$", $data)) return; 
     389                //if (preg_match('/^[\n\r \t]+$/', $data)) return; 
    390390                // print "adding [${data}]\n"; 
    391391 
     
    460460                // return a timet in the localtime, or UTC 
    461461                $t=0; 
    462                 if (ereg("([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})",$idate, $regs)) 
     462                if (preg_match('/([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})/',$idate, $regs)) 
    463463                { 
    464464                        if ($utc) 
     
    590590                $methName = $m->getParam(0); 
    591591                $methName = $methName->scalarval(); 
    592                 if (ereg("^system\.", $methName)) 
     592                if (preg_match('/^system\./', $methName)) 
    593593                { 
    594594                        $dmap = $GLOBALS['_xmlrpcs_dmap']; 
     
    637637                $methName = $m->getParam(0); 
    638638                $methName = $methName->scalarval(); 
    639                 if (ereg("^system\.", $methName)) 
     639                if (preg_match('/^system\./', $methName)) 
    640640                { 
    641641                        $dmap = $GLOBALS['_xmlrpcs_dmap']; 
Note: See TracChangeset for help on using the changeset viewer.