Changeset 5928


Ignore:
Timestamp:
04/12/12 11:15:33 (12 years ago)
Author:
marcosw
Message:

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

Location:
trunk
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/inc/class.uiaccounts.inc.php

    r2 r5928  
    7474                        { 
    7575                                // limit query to limit characters 
    76                                 if(eregi('^[a-z_0-9]+$',$_POST['query'])) 
     76                                if(preg_match('/^[a-z_0-9]+$/i',$_POST['query'])) 
    7777                                        $GLOBALS['query'] = $_POST['query']; 
    7878                        } 
     
    242242                        { 
    243243                                // limit query to limit characters 
    244                                 if(eregi('^[a-z_0-9]+$',$_REQUEST['query'])) 
     244                                if(preg_match('/^[a-z_0-9]+$/i',$_REQUEST['query'])) 
    245245                                        $GLOBALS['query'] = $_REQUEST['query']; 
    246246                        } 
  • trunk/contactcenter/inc/class.ui_data.inc.php

    r5288 r5928  
    47474747                                                $return['_existing']++; 
    47484748                                        } 
    4749                                         else if((!eregi("^[a-zA-Z0-9][_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]{1,})*$", $email)) && $email) { 
     4749                                        else if((!preg_match('/^[a-zA-Z0-9][_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]{1,})*$/i', $email)) && $email) { 
    47504750                                                $return['_failure']++; 
    47514751                                                $return['_failure_status'] .= "Line: " . ($line_iteration + 2) . ", Invalid E-Mail address: " . $email ."<br>"; 
  • trunk/expressoMail1_2/inc/show_user_photo.php

    r5509 r5928  
    2323        $mail = $_GET['mail']; 
    2424         
    25         if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$", $mail)) 
     25        if (!preg_match('/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$/i', $mail)) 
    2626                exit; 
    2727         
  • trunk/listAdmin/inc/class.uimaillists.inc.php

    r3514 r5928  
    5555                        { 
    5656                                // limit query to limit characters 
    57                                 if(eregi('^[a-z_0-9_%-].+$',$_POST['query']))  
     57                                if(preg_match('/^[a-z_0-9_%-].+$/i',$_POST['query']))  
    5858                                        $GLOBALS['query'] = $_POST['query']; 
    5959                        } 
  • trunk/mobile/inc/class.ui_mobilecc.inc.php

    r5043 r5928  
    913913                                $pattern = "^[a-z0-9_\.\-]+@[a-z0-9_\.\-]*[a-z0-9_\-]+\.[a-z]{2,4}$"; 
    914914 
    915                                 if (!eregi($pattern, $data['email'])){ 
     915                                if (!preg_match("/$pattern/i", $data['email'])){ 
    916916                                        $valid = lang('invalid field e-mail'); 
    917917                                } 
  • trunk/phpgwapi/inc/class.clientsniffer.inc.php

    r5912 r5928  
    7676 
    7777                        // Determine NAME Name and Version       
    78                         if ( eregi( 'MSIE ([0-9].[0-9a-zA-Z]{1,4})',$this->UA,$info) || 
    79                                 eregi( 'Microsoft Internet Explorer ([0-9].[0-9a-zA-Z]{1,4})',$this->UA,$info) )  
     78                        if ( preg_match( '/MSIE ([0-9].[0-9a-zA-Z]{1,4})/i',$this->UA,$info) || 
     79                                preg_match( '/Microsoft Internet Explorer ([0-9].[0-9a-zA-Z]{1,4})/i',$this->UA,$info) )  
    8080                        { 
    8181                                $this->VERSION = $info[1]; 
    8282                                $this->NAME = 'IE'; 
    8383                        }  
    84                         elseif ( eregi( 'Opera ([0-9].[0-9a-zA-Z]{1,4})',$this->UA,$info) || 
    85                                 eregi( 'Opera/([0-9].[0-9a-zA-Z]{1,4})',$this->UA,$info) )  
     84                        elseif ( preg_match( '/Opera ([0-9].[0-9a-zA-Z]{1,4})/i',$this->UA,$info) || 
     85                                preg_match( '/Opera\/([0-9].[0-9a-zA-Z]{1,4})/i',$this->UA,$info) )  
    8686                        { 
    8787                                $this->VERSION = $info[1]; 
    8888                                $this->NAME = 'Opera'; 
    8989                        } 
    90                         elseif ( eregi( 'iCab ([0-9].[0-9a-zA-Z]{1,4})',$this->UA,$info) || 
    91                                 eregi( 'iCab/([0-9].[0-9a-zA-Z]{1,4})',$this->UA,$info) )  
     90                        elseif ( preg_match( '/iCab ([0-9].[0-9a-zA-Z]{1,4})/i',$this->UA,$info) || 
     91                                preg_match( '/iCab\/([0-9].[0-9a-zA-Z]{1,4})/i',$this->UA,$info) )  
    9292                        { 
    9393                                $this->VERSION = $info[1]; 
    9494                                $this->NAME = 'iCab'; 
    9595                        } 
    96                         elseif ( eregi( 'Netscape6/([0-9].[0-9a-zA-Z]{1,4})',$this->UA,$info) )  
     96                        elseif ( preg_match( '/Netscape6\/([0-9].[0-9a-zA-Z]{1,4})/i',$this->UA,$info) )  
    9797                        { 
    9898                                $this->VERSION = $info[1]; 
    9999                                $this->NAME = 'Netscape'; 
    100100                        } 
    101                         elseif ( eregi( 'Mozilla/([0-9].[0-9a-zA-Z]{1,4})',$this->UA,$info) )  
     101                        elseif ( preg_match( '/Mozilla\/([0-9].[0-9a-zA-Z]{1,4})/i',$this->UA,$info) )  
    102102                        { 
    103103                                $this->VERSION = $info[1]; 
     
    111111 
    112112                        // Determine if AOL or WEBTV 
    113                         if( eregi( 'aol',$this->UA,$info)) 
     113                        if( preg_match( '/aol/i',$this->UA,$info)) 
    114114                        { 
    115115                                $this->AOL = true; 
    116116                        } 
    117                         elseif( eregi( 'webtv',$this->UA,$info)) 
     117                        elseif( preg_match( '/webtv/i',$this->UA,$info)) 
    118118                        { 
    119119                                $this->WEBTV = true; 
     
    138138 
    139139                        // Check for Windows 16-bit 
    140                         if( eregi('Win16',$this->UA)           ||  
    141                         eregi('windows 3.1',$this->UA)     ||  
    142                         eregi('windows 16-bit',$this->UA)  ||  
    143                         eregi('16bit',$this->UA)) 
     140                        if( preg_match('/Win16/i',$this->UA)           ||  
     141                        preg_match('/windows 3.1/i',$this->UA)     ||  
     142                        preg_match('/windows 16-bit/i',$this->UA)  ||  
     143                        preg_match('/16bit/i',$this->UA)) 
    144144                        { 
    145145                                $this->PLATFORM = 'Win16'; 
     
    148148 
    149149                        // Check for Windows 32-bit      
    150                         if(eregi('Win95',$this->UA) || eregi('windows 95',$this->UA))  
     150                        if(preg_match('/Win95/i',$this->UA) || preg_match('/windows 95/i',$this->UA))  
    151151                        { 
    152152                                $this->PLATFORM = 'Win32';  
    153153                                $this->OS = 'Win95';  
    154154                        } 
    155                         elseif(eregi('Win98',$this->UA) || eregi('windows 98',$this->UA))  
     155                        elseif(preg_match('/Win98/i',$this->UA) || preg_match('/windows 98/i',$this->UA))  
    156156                        { 
    157157                                $this->PLATFORM = 'Win32';  
    158158                                $this->OS = 'Win98';  
    159159                        } 
    160                         elseif(eregi('WinNT',$this->UA) || eregi('windows NT',$this->UA))  
     160                        elseif(preg_match('/WinNT/i',$this->UA) || preg_match('/windows NT/i',$this->UA))  
    161161                        { 
    162162                                $this->PLATFORM = 'Win32';  
     
    170170 
    171171                        // Check for OS/2 
    172                         if( eregi('os/2',$this->UA) || eregi('ibm-webexplorer',$this->UA)) 
     172                        if( preg_match('/os\/2/i',$this->UA) || preg_match('/ibm-webexplorer/i',$this->UA)) 
    173173                        { 
    174174                                $this->PLATFORM = 'OS2'; 
     
    177177 
    178178                        // Check for Mac 68000 
    179                         if( eregi('68k',$this->UA) || eregi('68000',$this->UA)) 
     179                        if( preg_match('/68k/i',$this->UA) || preg_match('/68000/i',$this->UA)) 
    180180                        { 
    181181                                $this->PLATFORM = 'Mac'; 
     
    184184 
    185185                        //Check for Mac PowerPC 
    186                         if( eregi('ppc',$this->UA) || eregi('powerpc',$this->UA)) 
     186                        if( preg_match('/ppc/i',$this->UA) || preg_match('/powerpc/i',$this->UA)) 
    187187                        { 
    188188                                $this->PLATFORM = 'Mac'; 
     
    193193 
    194194                        //SunOS 
    195                         if(eregi('sunos',$this->UA))  
     195                        if(preg_match('/sunos/i',$this->UA))  
    196196                        { 
    197197                                $this->PLATFORM = 'Unix'; 
    198198                                $this->OS = 'sun'; 
    199199                        } 
    200                         if(eregi('sunos 4',$this->UA))  
     200                        if(preg_match('/sunos 4/i',$this->UA))  
    201201                        { 
    202202                                $this->PLATFORM = 'Unix'; 
    203203                                $this->OS = 'sun4'; 
    204204                        } 
    205                         elseif(eregi('sunos 5',$this->UA))  
     205                        elseif(preg_match('/sunos 5/i',$this->UA))  
    206206                        { 
    207207                                $this->PLATFORM = 'Unix'; 
    208208                                $this->OS = 'sun5'; 
    209209                        } 
    210                         elseif(eregi('i86',$this->UA))  
     210                        elseif(preg_match('/i86/i',$this->UA))  
    211211                        { 
    212212                                $this->PLATFORM = 'Unix'; 
     
    215215 
    216216                        // Irix 
    217                         if(eregi('irix',$this->UA)) 
     217                        if(preg_match('/irix/',$this->UA)) 
    218218                        { 
    219219                                $this->PLATFORM = 'Unix'; 
    220220                                $this->OS = 'irix'; 
    221221                        } 
    222                         if(eregi('irix 6',$this->UA))  
     222                        if(preg_match('/irix 6/i',$this->UA))  
    223223                        { 
    224224                                $this->PLATFORM = 'Unix'; 
    225225                                $this->OS = 'irix6'; 
    226226                        } 
    227                         elseif(eregi('irix 5',$this->UA))  
     227                        elseif(preg_match('/irix 5/i',$this->UA))  
    228228                        { 
    229229                                $this->PLATFORM = 'Unix'; 
     
    232232 
    233233                        //HP-UX 
    234                         if(eregi('hp-ux',$this->UA)) 
     234                        if(preg_match('/hp-ux/i',$this->UA)) 
    235235                        { 
    236236                                $this->PLATFORM = 'Unix'; 
    237237                                $this->OS = 'hpux'; 
    238238                        } 
    239                         if(eregi('hp-ux',$this->UA) && preg_match('/10./',$this-UA))   
     239                        if(preg_match('/hp-ux/i',$this->UA) && preg_match('/10./',$this-UA))   
    240240                        { 
    241241                                $this->PLATFORM = 'Unix'; 
    242242                                $this->OS = 'hpux10'; 
    243243                        } 
    244                         elseif(eregi('hp-ux',$this->UA) && preg_match('/09./',$this-UA))   
     244                        elseif(preg_match('/hp-ux/i',$this->UA) && preg_match('/09./',$this-UA))   
    245245                        { 
    246246                                $this->PLATFORM = 'Unix'; 
     
    249249 
    250250                        //AIX 
    251                         if(eregi('aix',$this->UA)) 
     251                        if(preg_match('/aix/i',$this->UA)) 
    252252                        { 
    253253                                $this->PLATFORM = 'Unix'; 
    254254                                $this->OS = 'aix'; 
    255255                        } 
    256                         if(eregi('aix1',$this->UA)) 
     256                        if(preg_match('/aix1/i',$this->UA)) 
    257257                        { 
    258258                                $this->PLATFORM = 'Unix'; 
    259259                                $this->OS = 'aix1'; 
    260260                        } 
    261                         elseif(eregi('aix2',$this->UA)) 
     261                        elseif(preg_match('/aix2/i',$this->UA)) 
    262262                        { 
    263263                                $this->PLATFORM = 'Unix'; 
    264264                                $this->OS = 'aix2'; 
    265265                        } 
    266                         elseif(eregi('aix3',$this->UA)) 
     266                        elseif(preg_match('/aix3/i',$this->UA)) 
    267267                        { 
    268268                                $this->PLATFORM = 'Unix'; 
    269269                                $this->OS = 'aix3'; 
    270270                        } 
    271                         elseif(eregi('aix4',$this->UA)) 
     271                        elseif(preg_match('/aix4/i',$this->UA)) 
    272272                        { 
    273273                                $this->PLATFORM = 'Unix'; 
     
    276276 
    277277                        // Linux 
    278                         if(eregi('inux',$this->UA)) 
     278                        if(preg_match('/inux/i',$this->UA)) 
    279279                        { 
    280280                                $this->PLATFORM = 'Unix'; 
     
    283283 
    284284                        //Unixware 
    285                         if(eregi('unix_system_v',$this->UA)) 
     285                        if(preg_match('/unix_system_v/i',$this->UA)) 
    286286                        { 
    287287                                $this->PLATFORM = 'Unix'; 
     
    290290 
    291291                        //mpras 
    292                         if(eregi('ncr',$this->UA)) 
     292                        if(preg_match('/ncr/i',$this->UA)) 
    293293                        { 
    294294                                $this->PLATFORM = 'Unix'; 
     
    297297 
    298298                        //Reliant 
    299                         if(eregi('reliantunix',$this->UA)) 
     299                        if(preg_match('/reliantunix/i',$this->UA)) 
    300300                        { 
    301301                                $this->PLATFORM = 'Unix'; 
     
    304304 
    305305                        // DEC 
    306                         if(eregi('dec',$this->UA)           ||   
    307                         eregi('osfl',$this->UA)          ||  
    308                         eregi('alphaserver',$this->UA)   ||  
    309                         eregi('ultrix',$this->UA)        ||  
    310                         eregi('alphastation',$this->UA)) 
     306                        if(preg_match('/dec/i',$this->UA)           ||   
     307                        preg_match('/osfl/i',$this->UA)          ||  
     308                        preg_match('/alphaserver/i',$this->UA)   ||  
     309                        preg_match('/ultrix/i',$this->UA)        ||  
     310                        preg_match('/alphastation/i',$this->UA)) 
    311311                        { 
    312312                                $this->PLATFORM = 'Unix'; 
     
    315315 
    316316                        // Sinix 
    317                         if(eregi('sinix',$this->UA))     
     317                        if(preg_match('/sinix/i',$this->UA))     
    318318                        { 
    319319                                $this->PLATFORM = 'Unix'; 
     
    322322 
    323323                        // FreeBSD 
    324                         if(eregi('freebsd',$this->UA))     
     324                        if(preg_match('/freebsd/i',$this->UA))     
    325325                        { 
    326326                                $this->PLATFORM = 'Unix'; 
     
    329329 
    330330                        // BSD 
    331                         if(eregi('bsd',$this->UA))     
     331                        if(preg_match('/bsd/i',$this->UA))     
    332332                        { 
    333333                                $this->PLATFORM = 'Unix'; 
     
    336336 
    337337                        // VMS 
    338                         if(eregi('vax',$this->UA) || eregi('openvms',$this->UA))     
     338                        if(preg_match('/vax/i',$this->UA) || preg_match('/openvms/i',$this->UA))     
    339339                        { 
    340340                                $this->PLATFORM = 'Unix'; 
     
    343343 
    344344                        // SCO 
    345                         if(eregi('sco',$this->UA) || eregi('unix_sv',$this->UA))     
     345                        if(preg_match('/sco/i',$this->UA) || preg_match('/unix_sv/i',$this->UA))     
    346346                        { 
    347347                                $this->PLATFORM = 'Unix'; 
     
    352352 
    353353                        // make the code a bit easier to read 
    354                         $ie  = eregi('ie',$this->NAME); 
    355                         $ie5 = ( eregi('ie',$this->NAME) && ($this->MAJORVER >= 5) ); 
    356                         $ie4 = ( eregi('ie',$this->NAME) && ($this->MAJORVER >= 4) ); 
    357                         $ie3 = ( eregi('ie',$this->NAME) && ($this->MAJORVER >= 3) ); 
    358  
    359                         $nav  = eregi('netscape',$this->NAME); 
    360                         $nav5 = ( eregi('netscape',$this->NAME) && ($this->MAJORVER >= 5) ); 
    361                         $nav4 = ( eregi('netscape',$this->NAME) && ($this->MAJORVER >= 4) ); 
    362                         $nav3 = ( eregi('netscape',$this->NAME) && ($this->MAJORVER >= 3) ); 
    363                         $nav2 = ( eregi('netscape',$this->NAME) && ($this->MAJORVER >= 2) ); 
    364  
    365                         $opera = eregi('opera',$this->NAME); 
     354                        $ie  = preg_match('/ie/i',$this->NAME); 
     355                        $ie5 = ( preg_match('/ie/i',$this->NAME) && ($this->MAJORVER >= 5) ); 
     356                        $ie4 = ( preg_match('/ie/i',$this->NAME) && ($this->MAJORVER >= 4) ); 
     357                        $ie3 = ( preg_match('/ie/i',$this->NAME) && ($this->MAJORVER >= 3) ); 
     358 
     359                        $nav  = preg_match('/netscape/i',$this->NAME); 
     360                        $nav5 = ( preg_match('/netscape/i',$this->NAME) && ($this->MAJORVER >= 5) ); 
     361                        $nav4 = ( preg_match('/netscape/i',$this->NAME) && ($this->MAJORVER >= 4) ); 
     362                        $nav3 = ( preg_match('/netscape/i',$this->NAME) && ($this->MAJORVER >= 3) ); 
     363                        $nav2 = ( preg_match('/netscape/i',$this->NAME) && ($this->MAJORVER >= 2) ); 
     364 
     365                        $opera = preg_match('/opera/i',$this->NAME); 
    366366 
    367367                        // do the assumption 
  • trunk/phpgwapi/inc/class.common.inc.php

    r5912 r5928  
    713713                                while ($file = readdir($dh)) 
    714714                                { 
    715                                         if (eregi("\.css$", $file) && $file != 'phpgw.css') 
     715                                        if (preg_match('/\.css$/i', $file) && $file != 'phpgw.css') 
    716716                                        { 
    717717                                                $list[] = substr($file,0,strpos($file,'.')); 
     
    724724                                while ($file = readdir($dh)) 
    725725                                { 
    726                                         if (eregi("\.theme$", $file)) 
     726                                        if (preg_match('/\.theme$/i', $file)) 
    727727                                        { 
    728728                                                $list[] = substr($file,0,strpos($file,'.')); 
  • trunk/phpgwapi/inc/class.setup_html.inc.php

    r3540 r5928  
    316316                        while ($file = $dh->read()) 
    317317                        { 
    318                                 if (eregi("\.theme$", $file)) 
     318                                if (preg_match('/\.theme$/i', $file)) 
    319319                                { 
    320320                                        $list[] = substr($file,0,strpos($file,'.')); 
  • trunk/phpgwapi/inc/class.soapclient.inc.php

    r5509 r5928  
    144144                                        { 
    145145                                                // fault? 
    146                                                 if(eregi('fault',$return->name)) 
     146                                                if(preg_match('/fault/i',$return->name)) 
    147147                                                { 
    148148                                                        $this->debug('got fault'); 
  • trunk/phpgwapi/inc/class.validator.inc.php

    r5913 r5928  
    144144                        { 
    145145                                //echo ' is valid<br>host ' . $url_elements['host']; 
    146                                 if( eregi("[a-z]", $url_elements['host']) ) 
     146                                if( preg_match('/[a-z]/i', $url_elements['host']) ) 
    147147                                { 
    148148                                        //echo ' is name<br>'; 
     
    197197                                { 
    198198                                        //echo "Checking $seg<br>"; 
    199                                         if(eregi("[a-z0-9\-]{0,62}",$seg)) 
     199                                        if(preg_match('/[a-z0-9\-]{0,62}/i',$seg)) 
    200200                                        { 
    201201                                                $return = True;  
  • trunk/phpgwapi/inc/class.xml.inc.php

    r5915 r5928  
    11401140                } 
    11411141            } 
    1142             elseif ( eregi("^@", $step) ) 
     1142            elseif ( preg_match('/^@/i', $step) ) 
    11431143            { 
    11441144                // Use the attribute axis and select the attribute. 
     
    11461146                $axis["node-test"] = substr($step, 1); 
    11471147            } 
    1148             elseif ( eregi("\]$", $step) ) 
     1148            elseif ( preg_match('/\]$/i', $step) ) 
    11491149            { 
    11501150                // Use the child axis and select a position. 
     
    30863086                { 
    30873087                    // Check whether it's the language, the user asks for. 
    3088                     if ( eregi("^".$arguments, $this->nodes[$node] 
     3088                    if ( preg_match("/^$arguments/i", $this->nodes[$node] 
    30893089                        ["attributes"]["xml:lang"]) ) 
    30903090                    { 
     
    31063106        { 
    31073107            // Check whether it's the language, the user asks for. 
    3108             if ( eregi("^".$arguments, $this->nodes[$node]["attributes"] 
     3108            if ( preg_match("/^$arguments/i", $this->nodes[$node]["attributes"] 
    31093109                ["xml:lang"]) ) 
    31103110            { 
  • trunk/phpgwapi/inc/common_functions.inc.php

    r3486 r5928  
    339339                                break; 
    340340                        case 'ip': 
    341                                 if (eregi("^[0-9]{1,3}(\.[0-9]{1,3}){3}$",$string)) 
     341                                if (preg_match('/^[0-9]{1,3}(\.[0-9]{1,3}){3}$/i',$string)) 
    342342                                { 
    343343                                        $octets = split('\.',$string); 
     
    360360                                break; 
    361361                        case 'email': 
    362                                 if (eregi("^([[:alnum:]_%+=.-]+)@([[:alnum:]_.-]+)\.([a-z]{2,3}|[0-9]{1,3})$",$string)) 
     362                                if (preg_match('/^([[:alnum:]_%+=.-]+)@([[:alnum:]_.-]+)\.([a-z]{2,3}|[0-9]{1,3})$/i',$string)) 
    363363                                { 
    364364                                        return True; 
  • trunk/phpgwapi/inc/fpdf/font/makefont/makefont.php

    r2 r5928  
    168168        if(isset($fm['StdVW'])) 
    169169                $stemv=$fm['StdVW']; 
    170         elseif(isset($fm['Weight']) and eregi('(bold|black)',$fm['Weight'])) 
     170        elseif(isset($fm['Weight']) and preg_match('/(bold|black)/i',$fm['Weight'])) 
    171171                $stemv=120; 
    172172        else 
  • trunk/preferences/templates/default/changepassword_default.php

    r5921 r5928  
    4242                { 
    4343                        $letter = $n_passwd[$i]; 
    44                         if (!preg_match("/[a-zA-Z]/", $letter ) ) 
     44                        if (!preg_match('/[a-zA-Z]/', $letter ) ) 
    4545                                $speccial_letter++; 
    4646                } 
  • trunk/services/class.ldap.php

    r5405 r5928  
    187187 
    188188    function phoneticFilter($search, $params) { 
    189         if (eregi("\d", $search)) 
     189        if (preg_match('/\d/i', $search)) 
    190190            return( "" ); 
    191191 
  • trunk/workflow/inc/class.BrowserInfo.inc.php

    r5921 r5928  
    7171 
    7272                // find operating system 
    73                 if (eregi("win", $agent)) 
     73                if (preg_match('/win/i', $agent)) 
    7474                        $bd['platform'] = "Windows"; 
    75                 elseif (eregi("mac", $agent)) 
     75                elseif (preg_match('/mac/i', $agent)) 
    7676                        $bd['platform'] = "MacIntosh"; 
    77                 elseif (eregi("linux", $agent)) 
     77                elseif (preg_match('/linux/i', $agent)) 
    7878                        $bd['platform'] = "Linux"; 
    79                 elseif (eregi("OS/2", $agent)) 
     79                elseif (preg_match('/OS\/2/i', $agent)) 
    8080                        $bd['platform'] = "OS/2"; 
    81                 elseif (eregi("BeOS", $agent)) 
     81                elseif (preg_match('/BeOS/i', $agent)) 
    8282                        $bd['platform'] = "BeOS"; 
    8383 
    8484                // test for Opera 
    85                 if (eregi("opera",$agent)) 
     85                if (preg_match('/opera/i',$agent)) 
    8686                { 
    8787                        $val = stristr($agent, "opera"); 
    88                         if (eregi("/", $val)) 
     88                        if (preg_match('/\//i', $val)) 
    8989                        { 
    9090                                $val = explode("/",$val); 
     
    102102                // test for WebTV 
    103103                } 
    104                 elseif (eregi("webtv",$agent)) 
     104                elseif (preg_match('/webtv/i',$agent)) 
    105105                { 
    106106                        $val = explode("/",stristr($agent,"webtv")); 
     
    110110                // test for MS Internet Explorer version 1 
    111111                } 
    112                 elseif (eregi("microsoft internet explorer", $agent)) 
     112                elseif (preg_match('/microsoft internet explorer/i', $agent)) 
    113113                { 
    114114                        $bd['browser'] = "MSIE"; 
     
    120120                // test for NetPositive 
    121121                } 
    122                 elseif (eregi("NetPositive", $agent)) 
     122                elseif (preg_match('/NetPositive/i', $agent)) 
    123123                { 
    124124                        $val = explode("/",stristr($agent,"NetPositive")); 
     
    129129                // test for MS Internet Explorer 
    130130                } 
    131                 elseif (eregi("msie",$agent) && !eregi("opera",$agent)) 
     131                elseif (preg_match('/msie/i',$agent) && !preg_match('/opera/i',$agent)) 
    132132                { 
    133133                        $val = explode(" ",stristr($agent,"msie")); 
     
    137137                // test for MS Pocket Internet Explorer 
    138138                } 
    139                 elseif (eregi("mspie",$agent) || eregi('pocket', $agent)) 
     139                elseif (preg_match('/mspie/i',$agent) || preg_match('/pocket/i', $agent)) 
    140140                { 
    141141                        $val = explode(" ",stristr($agent,"mspie")); 
    142142                        $bd['browser'] = "MSPIE"; 
    143143                        $bd['platform'] = "WindowsCE"; 
    144                         if (eregi("mspie", $agent)) 
     144                        if (preg_match('/mspie/i', $agent)) 
    145145                                $bd['version'] = $val[1]; 
    146146                        else 
     
    152152                // test for Galeon 
    153153                } 
    154                 elseif (eregi("galeon",$agent)) 
     154                elseif (preg_match('/galeon/i',$agent)) 
    155155                { 
    156156                        $val = explode(" ",stristr($agent,"galeon")); 
     
    161161                // test for Konqueror 
    162162                } 
    163                 elseif (eregi("Konqueror",$agent)) 
     163                elseif (preg_match('/Konqueror/i',$agent)) 
    164164                { 
    165165                        $val = explode(" ",stristr($agent,"Konqueror")); 
     
    170170                // test for iCab 
    171171                } 
    172                 elseif (eregi("icab",$agent)) 
     172                elseif (preg_match('/icab/i',$agent)) 
    173173                { 
    174174                        $val = explode(" ",stristr($agent,"icab")); 
     
    178178                // test for OmniWeb 
    179179                } 
    180                 elseif (eregi("omniweb",$agent)) 
     180                elseif (preg_match('/omniweb/i',$agent)) 
    181181                { 
    182182                        $val = explode("/",stristr($agent,"omniweb")); 
     
    186186                // test for Phoenix 
    187187                } 
    188                 elseif (eregi("Phoenix", $agent)) 
     188                elseif (preg_match('/Phoenix/i', $agent)) 
    189189                { 
    190190                        $bd['browser'] = "Phoenix"; 
     
    194194                // test for Firebird 
    195195                } 
    196                 elseif (eregi("firebird", $agent)) 
     196                elseif (preg_match('/firebird/i', $agent)) 
    197197                { 
    198198                        $bd['browser']="Firebird"; 
     
    203203                // test for Firefox 
    204204                } 
    205                 elseif (eregi("Firefox", $agent)) 
     205                elseif (preg_match('/Firefox/i', $agent)) 
    206206                { 
    207207                        $bd['browser']="Firefox"; 
     
    212212          // test for Mozilla Alpha/Beta Versions 
    213213                } 
    214                 elseif (eregi("mozilla",$agent) && eregi("rv:[0-9].[0-9][a-b]",$agent) && !eregi("netscape",$agent)) 
     214                elseif (preg_match('/mozilla/i',$agent) && preg_match('/rv:[0-9].[0-9][a-b]/i',$agent) && !preg_match('/netscape/i',$agent)) 
    215215                { 
    216216                        $bd['browser'] = "Mozilla"; 
    217217                        $val = explode(" ",stristr($agent,"rv:")); 
    218                         eregi("rv:[0-9].[0-9][a-b]",$agent,$val); 
     218                        preg_match('/rv:[0-9].[0-9][a-b]/i',$agent,$val); 
    219219                        $bd['version'] = str_replace("rv:","",$val[0]); 
    220220 
    221221                // test for Mozilla Stable Versions 
    222222                } 
    223                 elseif (eregi("mozilla",$agent) && eregi("rv:[0-9]\.[0-9]",$agent) && !eregi("netscape",$agent)) 
     223                elseif (preg_match('/mozilla/i',$agent) && preg_match('/rv:[0-9]\.[0-9]/i',$agent) && !preg_match('/netscape/i',$agent)) 
    224224                { 
    225225                        $bd['browser'] = "Mozilla"; 
    226226                        $val = explode(" ",stristr($agent,"rv:")); 
    227                         eregi("rv:[0-9]\.[0-9]\.[0-9]",$agent,$val); 
     227                        preg_match('/rv:[0-9]\.[0-9]\.[0-9]/i',$agent,$val); 
    228228                        $bd['version'] = str_replace("rv:","",$val[0]); 
    229229 
    230230                // test for Lynx & Amaya 
    231231                } 
    232                 elseif (eregi("libwww", $agent)) 
    233                 { 
    234                         if (eregi("amaya", $agent)) 
     232                elseif (preg_match('/libwww/i', $agent)) 
     233                { 
     234                        if (preg_match('/amaya/i', $agent)) 
    235235                        { 
    236236                                $val = explode("/",stristr($agent,"amaya")); 
     
    248248                // test for Safari 
    249249                } 
    250                 elseif (eregi("safari", $agent)) 
     250                elseif (preg_match('/safari/i', $agent)) 
    251251                { 
    252252                        $bd['browser'] = "Safari"; 
     
    255255                // remaining two tests are for Netscape 
    256256                } 
    257                 elseif (eregi("netscape",$agent)) 
     257                elseif (preg_match('/netscape/i',$agent)) 
    258258                { 
    259259                        $val = explode(" ",stristr($agent,"netscape")); 
     
    262262                        $bd['version'] = $val[1]; 
    263263                } 
    264                 elseif (eregi("mozilla",$agent) && !eregi("rv:[0-9]\.[0-9]\.[0-9]",$agent)) 
     264                elseif (preg_match('/mozilla/i',$agent) && !preg_match('/rv:[0-9]\.[0-9]\.[0-9]/i',$agent)) 
    265265                { 
    266266                        $val = explode(" ",stristr($agent,"mozilla")); 
     
    276276 
    277277                // check for AOL 
    278                 if (eregi("AOL", $agent)) 
     278                if (preg_match('/AOL/i', $agent)) 
    279279                { 
    280280                        $var = stristr($agent, "AOL"); 
  • trunk/workflow/inc/class.bo_utils.inc.php

    r5122 r5928  
    7474 
    7575                // verifica se o nome digitado contém apenas letras e/ou espaços 
    76                 if(eregi("^[a-z -]*$", $cn)){ 
     76                if(preg_match('/^[a-z -]*$/i', $cn)){ 
    7777                        if (strlen($cn) < 3) 
    7878                        { 
  • trunk/workflow/inc/class.utils.security.php

    r795 r5928  
    142142                        list($attrSubSet[0]) = explode(' ', $attrSubSet[0]); 
    143143                        // removes all "non-regular" attr names AND also attr blacklisted 
    144                         if ((!eregi("^[a-z]*$",$attrSubSet[0])) || (($this->xssAuto) && ((in_array(strtolower($attrSubSet[0]), $this->attrBlacklist)) || (substr($attrSubSet[0], 0, 2) == 'on')))) 
     144                        if ((!preg_match('/^[a-z]*$/i',$attrSubSet[0])) || (($this->xssAuto) && ((in_array(strtolower($attrSubSet[0]), $this->attrBlacklist)) || (substr($attrSubSet[0], 0, 2) == 'on')))) 
    145145                                continue; 
    146146                        // xss attr value filtering 
  • trunk/workflow/inc/fpdf/font/makefont/makefont.php

    r795 r5928  
    172172        if(isset($fm['StdVW'])) 
    173173                $stemv=$fm['StdVW']; 
    174         elseif(isset($fm['Weight']) and eregi('(bold|black)',$fm['Weight'])) 
     174        elseif(isset($fm['Weight']) and preg_match('/(bold|black)/i',$fm['Weight'])) 
    175175                $stemv=120; 
    176176        else 
  • trunk/workflow/inc/local/classes/class.wf_instance.php

    r4921 r5928  
    388388                foreach ($users as &$user) 
    389389                { 
    390                         if (!eregi('^[p]{0,1}[0-9]+$', "$user")) 
     390                        if (!preg_match('/^[p]{0,1}[0-9]+$/i', "$user")) 
    391391                                trigger_error('wf_engine::getUserInstances: O usuário/perfil "' . $user . '" é inválido', E_USER_ERROR); 
    392392                        $user = "'{$user}'"; 
  • trunk/workflow/inc/local/classes/class.wf_regex.php

    r5921 r5928  
    525525                        return( preg_match("/$pattern/", (string) $input ) ); 
    526526                else 
    527                         return( eregi( $pattern, (string) $input ) ); 
     527                        return( preg_match("/$pattern/i", (string) $input ) ); 
    528528        } 
    529529 
  • trunk/workflow/inc/phplot/phplot.php

    r795 r5928  
    13131313        $asked = trim($which_opt); 
    13141314 
    1315         // FIXME: this for backward compatibility, as eregi() fails with empty strings. 
     1315        // FIXME: this for backward compatibility, as preg_match() fails with empty strings. 
    13161316        if ($asked == '') 
    13171317            return ''; 
    13181318 
    13191319        $asked = strtolower($asked); 
    1320         if (@ eregi($asked, $which_acc)) { 
     1320        if (@ preg_match("/$asked/i", $which_acc)) { 
    13211321            return $asked; 
    13221322        } else { 
Note: See TracChangeset for help on using the changeset viewer.