Changeset 5921


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
Files:
23 edited

Legend:

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

    r5316 r5921  
    12781278 
    12791279                                $this->line = $this->line + 1; 
    1280                         while (ereg("^[[:space:]]", $ical_text[$this->line])) { 
     1280                        while (preg_match('/^[[:space:]]/', $ical_text[$this->line])) { 
    12811281                                $str .= substr(str_replace("\r\n", '', $ical_text[$this->line]), 1); 
    12821282                                        $this->line = $this->line + 1; 
     
    13921392        function parse_parameters(& $event, $majortype, $value) { 
    13931393                        //$this->debug ('value: '.$value); 
    1394                 if (!ereg('[\=\;]', $value)) { 
     1394                if (!preg_match('/[\=\;]/', $value)) { 
    13951395                        $return_value[] = Array ( 
    13961396                                        'param' => $majortype, 
     
    13991399                                $value = ''; 
    14001400                        } 
    1401                 elseif (ereg('(.*(\:\\\\)?.*):(.*)', $value, $temp)) { 
     1401                elseif (preg_match('/(.*(\:\\\\)?.*):(.*)/', $value, $temp)) { 
    14021402                                //$this->debug('Value : '._debug_array($temp,False)); 
    14031403                                //$this->debug('Param '.$majortype.' Value : '.$temp[3]); 
     
    14091409                                $value = str_replace(':MAILTO', '', $temp[1]); 
    14101410                                } 
    1411                         while (ereg('(([A-Z\-]*)[=]([[:alnum:] \_\)\(\/\$\.\,\:\\\|\*\&\^\%\#\!\~\"\?\&\@\<\>\-]*))([\;]?)(.*)', $value, $temp)) { 
     1411                        while (preg_match('/(([A-Z\-]*)[=]([[:alnum:] \_\)\(\/\$\.\,\:\\\|\*\&\^\%\#\!\~\"\?\&\@\<\>\-]*))([\;]?)(.*)/', $value, $temp)) { 
    14121412                                        //$this->debug('Value : '._debug_array($temp,False)); 
    14131413                                        //$this->debug('Param '.$temp[2].' Value : '.$temp[3]); 
     
    14201420                                } 
    14211421                } else { 
    1422                         while (ereg('(([A-Z\-]*)[=]([[:alnum:] \_\)\(\/\$\.\,\:\\\|\*\&\^\%\#\!\~\"\?\&\@\<\>\-]*))([\;]?)(.*)', $value, $temp)) { 
     1422                        while (preg_match('/(([A-Z\-]*)[=]([[:alnum:] \_\)\(\/\$\.\,\:\\\|\*\&\^\%\#\!\~\"\?\&\@\<\>\-]*))([\;]?)(.*)/', $value, $temp)) { 
    14231423                                $this->debug('Value : ' . _debug_array($temp, False)); 
    14241424                                $this->debug('Param ' . $temp[2] . ' Value : ' . $temp[3]); 
     
    23472347                        //                              } 
    23482348 
    2349                         ereg($property_regexp, $text, $temp); 
     2349                        preg_match("/$property_regexp/", $text, $temp); 
    23502350                                //$this->debug ('Majortype dump: '._debug_array($temp, false) ); 
    23512351                        $majortype = str_replace('-', '_', strtolower($temp[1])); 
     
    23812381                                if (isset ($_f_['day_raw']) OR $_f_['day_raw']) { 
    23822382                                                // Days 
    2383                                         //                                              if(ereg('D', $_f_['day_raw'])) 
     2383                                        //                                              if(preg_match('/D/', $_f_['day_raw'])) 
    23842384                                        if (strstr($_f_['day_raw'], 'D')) { 
    23852385                                                        $dur['days'] = eregi_replace("([0-9]+)D(.*)", "\\1", $_f_['day_raw']); 
     
    23872387 
    23882388                                                // Weeks 
    2389                                         //                                              if(ereg("W", $_f_["day_raw"])) 
     2389                                        //                                              if(preg_match('/W/', $_f_["day_raw"])) 
    23902390                                        if (strstr($_f_['day_raw'], 'W')) { 
    23912391                                                        $dur['weeks'] = eregi_replace("([^|.*]+D)?([0-9]+)W", "\\2", $_f_['day_raw']); 
     
    23962396                                if (isset ($_f_['time_raw']) OR $_f_['time_raw']) { 
    23972397                                                // Hours 
    2398                                         //                                              if(ereg("H", $_f_["time_raw"])) 
     2398                                        //                                              if(preg_match('/H/', $_f_["time_raw"])) 
    23992399                                        if (strstr($_f_['time_raw'], 'H')) { 
    24002400                                                        $dur['hours'] = eregi_replace("([0-9]+)H(.*)", "\\1", $_f_['time_raw']); 
     
    24032403                                                // Minutes 
    24042404                                                /* If you find better, contact me very quickly :) */ 
    2405                                         //                                              if(ereg("M", $_f_["time_raw"])) 
     2405                                        //                                              if(preg_match('/M/', $_f_["time_raw"])) 
    24062406                                        if (strstr($_f_['time_raw'], 'M')) { 
    24072407                                                        $dur['minutes'] = eregi_replace("([^|.*]+H)?([0-9]+)M(.*)", "\\2", $_f_['time_raw']); 
     
    24102410                                                // Seconds 
    24112411                                                /* Same comment :) */ 
    2412                                         //                                              if(ereg("S", $_f_["time_raw"]) ) 
     2412                                        //                                              if(preg_match('/S/', $_f_["time_raw"]) ) 
    24132413                                        if (strstr($_f_['time_raw'], 'S')) { 
    24142414                                                        $dur['seconds'] = eregi_replace("([^|.*]+M)?([0-9]+)S(.*)", "\\2", $_f_['time_raw']); 
  • trunk/calendar/inc/class.uicalendar.inc.php

    r5316 r5921  
    45934593                        foreach($vars['participants']['data'] as $user => $str) 
    45944594                        { 
    4595                         if ($this->bo->check_perms(PHPGW_ACL_EDIT,0,$user) && ereg('^(.*) \((.*)\)$',$str,$parts)) 
     4595                        if ($this->bo->check_perms(PHPGW_ACL_EDIT,0,$user) && preg_match('/^(.*) \((.*)\)$/',$str,$parts)) 
    45964596                                { 
    45974597                                        $vars['participants']['data'][$user] = $parts[1].' (<a href="'.$this->page('edit_status','&cal_id='.$event['id'].'&owner='.$user).'">'.$parts[2].'</a>)'; 
  • 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); 
  • trunk/preferences/templates/default/changepassword_default.php

    r5509 r5921  
    4242                { 
    4343                        $letter = $n_passwd[$i]; 
    44                         if (! ereg ("[a-zA-Z]", $letter ) ) 
     44                        if (!preg_match("/[a-zA-Z]/", $letter ) ) 
    4545                                $speccial_letter++; 
    4646                } 
  • trunk/reports/inc/class.uireports.inc.php

    r5291 r5921  
    9797                                                $newval = str_replace(' ','_',$newval); 
    9898                                                /* Don't show passwords in the form */ 
    99                                                 if(ereg('passwd',$value) || ereg('password',$value) || ereg('root_pw',$value)) 
     99                                                if(preg_match('/passwd/',$value) || preg_match('/password/',$value) || preg_match('/root_pw/',$value)) 
    100100                                                { 
    101101                                                        $t->set_var($value,''); 
  • trunk/setup/manageheader.php

    r3991 r5921  
    3131         */ 
    3232        $realpath = realpath('..'); 
    33         if(!ereg('^' . $_SERVER['DOCUMENT_ROOT'],$realpath)) 
     33        if(!preg_match("/^$_SERVER['DOCUMENT_ROOT']/",$realpath)) 
    3434        { 
    3535                if(PHP_OS == 'Windows') 
  • trunk/workflow/inc/class.BrowserInfo.inc.php

    r795 r5921  
    115115                        $bd['version'] = "1.0"; 
    116116                        $var = stristr($agent, "/"); 
    117                         if (ereg("308|425|426|474|0b1", $var)) 
     117                        if (preg_match('/308|425|426|474|0b1/', $var)) 
    118118                                $bd['version'] = "1.5"; 
    119119 
  • trunk/workflow/inc/class.basemodel.inc.php

    r3167 r5921  
    127127                foreach ($attributes as $attribute => $value) { 
    128128                        /* parses only process-level attributes, whose names start with a _ signal */ 
    129                         if (ereg('^_{1}', $attribute)) { 
     129                        if (preg_match('/^_{1}/', $attribute)) { 
    130130                                $result[$attribute] = $this->{$attribute}; 
    131131                        } 
  • trunk/workflow/inc/class.bo_monitors.inc.php

    r3167 r5921  
    12481248                { 
    12491249                        /* split the e-mail according to definition */ 
    1250                         ereg('(.*)%inicio_loop%(.*)%fim_loop%(.*)', $emailBody, $records); 
     1250                        preg_match('/(.*)%inicio_loop%(.*)%fim_loop%(.*)/', $emailBody, $records); 
    12511251                        if (($records == null) || (count($records) != 4)) 
    12521252                                return array('error' => 'Formato de e-mail inválido'); 
  • trunk/workflow/inc/class.bo_orgchart.inc.php

    r3167 r5921  
    464464        function searchEmployee($params) 
    465465        { 
    466                 if (!ereg('^([[:alnum:] ]+)$', $params['search_term'])) 
     466                if (!preg_match('/^([[:alnum:] ]+)$/', $params['search_term'])) 
    467467                        die(serialize("Parametro de busca inválido")); 
    468468                $result = $this->so->searchEmployee($params['search_term'], $params['organizacao_id']); 
  • trunk/workflow/inc/class.bo_userinterface.inc.php

    r3167 r5921  
    920920        function searchEmployee($params) 
    921921        { 
    922                 if (!ereg('^([[:alnum:] -]+)$', $params['searchTerm'])) 
     922                if (!preg_match('/^([[:alnum:] -]+)$/', $params['searchTerm'])) 
    923923                        return array('error' => 'Parâmetro de busca inválido'); 
    924924 
  • trunk/workflow/inc/class.powergraphic.inc.php

    r3167 r5921  
    298298        $this->latin_notation = ((isset($_GET['latin_notation'])) && ($_GET['latin_notation'] == 1)) ? true : false; 
    299299 
    300         $this->legend_exists        = (ereg("(5|6)", $this->type)) ? true : false; 
     300        $this->legend_exists        = (preg_match('/(5|6)/', $this->type)) ? true : false; 
    301301        $this->biggest_graphic_name = (strlen($this->graphic_1) > strlen($this->graphic_2)) ? $this->graphic_1 : $this->graphic_2; 
    302302        $this->height_title         = (!empty($this->title)) ? ($this->string_height(5) + 15) : 0; 
     
    367367                    $temp[$num] = $value; 
    368368 
    369                     if ((!empty($_GET['z'.$num])) && (ereg("(1|2|3|4)", $this->type))) 
     369                    if ((!empty($_GET['z'.$num])) && (preg_match('/(1|2|3|4)/', $this->type))) 
    370370                    { 
    371371                        $this->graphic_2_exists = true; 
     
    449449 
    450450        // Draw axis and background lines for "vertical bars", "dots" and "lines" 
    451         if (ereg("^(1|3|4)$", $this->type)) 
     451        if (preg_match('/^(1|3|4)$/', $this->type)) 
    452452        { 
    453453            if ($this->legend_exists == true) 
     
    525525 
    526526        // Draw legend box for "pie" or "donut" 
    527         else if (ereg("^(5|6)$", $this->type)) 
     527        else if (preg_match('/^(5|6)$/', $this->type)) 
    528528        { 
    529529            $this->draw_legend(); 
     
    615615        * Draw graphic: DOTS or LINE 
    616616        */ 
    617         else if (ereg("^(3|4)$", $this->type)) 
     617        else if (preg_match('/^(3|4)$/', $this->type)) 
    618618        { 
    619619 
     
    680680        * Draw graphic: PIE or DONUT 
    681681        */ 
    682         else if (ereg("^(5|6)$", $this->type)) 
     682        else if (preg_match('/^(5|6)$/', $this->type)) 
    683683        { 
    684684            $center_x = ($this->graphic_area_x1 + $this->graphic_area_x2) / 2; 
     
    909909 
    910910        // Draw legend values for VERTICAL BARS, HORIZONTAL BARS, DOTS and LINES 
    911         if (ereg("^(1|2|3|4)$", $this->type)) 
    912         { 
    913             $color_1 = (ereg("^(1|2)$", $this->type)) ? $this->color['bars']   : $this->color['line']; 
    914             $color_2 = (ereg("^(1|2)$", $this->type)) ? $this->color['bars_2'] : $this->color['line_2']; 
     911        if (preg_match('/^(1|2|3|4)$/', $this->type)) 
     912        { 
     913            $color_1 = (preg_match('/^(1|2)$/', $this->type)) ? $this->color['bars']   : $this->color['line']; 
     914            $color_2 = (preg_match('/^(1|2)$/', $this->type)) ? $this->color['bars_2'] : $this->color['line_2']; 
    915915 
    916916            imagefilledrectangle($this->img, $x, $y, ($x+10), ($y+10), $color_1); 
     
    924924 
    925925        // Draw legend values for PIE or DONUT 
    926         else if (ereg("^(5|6)$", $this->type)) 
     926        else if (preg_match('/^(5|6)$/', $this->type)) 
    927927        { 
    928928            if (!empty($this->axis_x)) 
     
    10501050                $this->color['bg_legend']   = imagecolorallocate($this->img, 205, 205, 205); 
    10511051 
    1052                 if (ereg("^(1|2)$", $this->type)) 
     1052                if (preg_match('/^(1|2)$/', $this->type)) 
    10531053                { 
    10541054                    $this->color['bars']          = imagecolorallocate($this->img, 100, 150, 200); 
     
    10571057                    $this->color['bars_2_shadow'] = imagecolorallocate($this->img, 120, 170,  70); 
    10581058                } 
    1059                 else if (ereg("^(3|4)$", $this->type)) 
     1059                else if (preg_match('/^(3|4)$/', $this->type)) 
    10601060                { 
    10611061                    $this->color['line']   = imagecolorallocate($this->img, 100, 150, 200); 
    10621062                    $this->color['line_2'] = imagecolorallocate($this->img, 230, 100, 100); 
    10631063                } 
    1064                 else if (ereg("^(5|6)$", $this->type)) 
     1064                else if (preg_match('/^(5|6)$/', $this->type)) 
    10651065                { 
    10661066                    $this->color['arc_1']        = imagecolorallocate($this->img, 100, 150, 200); 
     
    10901090                $this->color['bg_legend']   = imagecolorallocate($this->img,  70,  70,  70); 
    10911091 
    1092                 if (ereg("^(1|2)$", $this->type)) 
     1092                if (preg_match('/^(1|2)$/', $this->type)) 
    10931093                { 
    10941094                    $this->color['bars']          = imagecolorallocate($this->img,  50, 200,  50); 
     
    10971097                    $this->color['bars_2_shadow'] = imagecolorallocate($this->img, 220, 220, 220); 
    10981098                } 
    1099                 else if (ereg("^(3|4)$", $this->type)) 
     1099                else if (preg_match('/^(3|4)$/', $this->type)) 
    11001100                { 
    11011101                    $this->color['line']   = imagecolorallocate($this->img, 220, 220, 220); 
    11021102                    $this->color['line_2'] = imagecolorallocate($this->img,   0, 180,   0); 
    11031103                } 
    1104                 else if (ereg("^(5|6)$", $this->type)) 
     1104                else if (preg_match('/^(5|6)$/', $this->type)) 
    11051105                { 
    11061106                    $this->color['arc_1']        = imagecolorallocate($this->img, 255, 255, 255); 
     
    11311131                $this->color['bg_legend']   = imagecolorallocate($this->img, 230, 230, 200); 
    11321132 
    1133                 if (ereg("^(1|2)$", $this->type)) 
     1133                if (preg_match('/^(1|2)$/', $this->type)) 
    11341134                { 
    11351135                    $this->color['bars']          = imagecolorallocate($this->img, 255, 170,  80); 
     
    11381138                    $this->color['bars_2_shadow'] = imagecolorallocate($this->img, 180, 150,   0); 
    11391139                } 
    1140                 else if (ereg("^(3|4)$", $this->type)) 
     1140                else if (preg_match('/^(3|4)$/', $this->type)) 
    11411141                { 
    11421142                    $this->color['line']   = imagecolorallocate($this->img, 230, 100,   0); 
  • trunk/workflow/inc/class.utils.url.php

    r795 r5921  
    157157                        return NULL; 
    158158                }                        
    159                 if (ereg("[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}", $this->host)) { 
     159                if (preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $this->host)) { 
    160160                        return gethostbyaddr($this->host); 
    161161                } else { 
     
    320320                        $url = $this->getUrl(); 
    321321                // busca a string de parametros 
    322                 if (ereg("([^?#]+\??)?([^#]+)?(.*)", $url, $matches)) {                  
     322                if (preg_match('/([^?#]+\??)?([^#]+)?(.*)/', $url, $matches)) {                  
    323323                        if (!$this->isFalse($matches[2])) { 
    324324                                // codifica os parametros 
     
    346346                        $url = $this->getUrl(); 
    347347                // busca os parï¿œmetros codificados             
    348                 ereg("([^?#]+\??)?([^#]+)?(.*)", $url, $matches); 
     348                preg_match('/([^?#]+\??)?([^#]+)?(.*)/', $url, $matches); 
    349349                if (!$this->isFalse($matches[2])) { 
    350350                        parse_str($matches[2], $vars); 
  • trunk/workflow/inc/engine/src/ProcessManager/ProcessManager.php

    r4740 r5921  
    480480                } 
    481481 
    482                 if (ereg('^[0-9]{1,2}\.[0-9]{1,2}$', $vars['wf_version']) === false) 
     482                if (preg_match('/^[0-9]{1,2}\.[0-9]{1,2}$/', $vars['wf_version']) === false) 
    483483                { 
    484484                        $msg = tra('invalid version specified'); 
  • 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.