Changeset 5921
- Timestamp:
- 04/11/12 17:21:30 (12 years ago)
- Location:
- trunk
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar/inc/class.boicalendar.inc.php
r5316 r5921 1278 1278 1279 1279 $this->line = $this->line + 1; 1280 while ( ereg("^[[:space:]]", $ical_text[$this->line])) {1280 while (preg_match('/^[[:space:]]/', $ical_text[$this->line])) { 1281 1281 $str .= substr(str_replace("\r\n", '', $ical_text[$this->line]), 1); 1282 1282 $this->line = $this->line + 1; … … 1392 1392 function parse_parameters(& $event, $majortype, $value) { 1393 1393 //$this->debug ('value: '.$value); 1394 if (! ereg('[\=\;]', $value)) {1394 if (!preg_match('/[\=\;]/', $value)) { 1395 1395 $return_value[] = Array ( 1396 1396 'param' => $majortype, … … 1399 1399 $value = ''; 1400 1400 } 1401 elseif ( ereg('(.*(\:\\\\)?.*):(.*)', $value, $temp)) {1401 elseif (preg_match('/(.*(\:\\\\)?.*):(.*)/', $value, $temp)) { 1402 1402 //$this->debug('Value : '._debug_array($temp,False)); 1403 1403 //$this->debug('Param '.$majortype.' Value : '.$temp[3]); … … 1409 1409 $value = str_replace(':MAILTO', '', $temp[1]); 1410 1410 } 1411 while ( ereg('(([A-Z\-]*)[=]([[:alnum:] \_\)\(\/\$\.\,\:\\\|\*\&\^\%\#\!\~\"\?\&\@\<\>\-]*))([\;]?)(.*)', $value, $temp)) {1411 while (preg_match('/(([A-Z\-]*)[=]([[:alnum:] \_\)\(\/\$\.\,\:\\\|\*\&\^\%\#\!\~\"\?\&\@\<\>\-]*))([\;]?)(.*)/', $value, $temp)) { 1412 1412 //$this->debug('Value : '._debug_array($temp,False)); 1413 1413 //$this->debug('Param '.$temp[2].' Value : '.$temp[3]); … … 1420 1420 } 1421 1421 } else { 1422 while ( ereg('(([A-Z\-]*)[=]([[:alnum:] \_\)\(\/\$\.\,\:\\\|\*\&\^\%\#\!\~\"\?\&\@\<\>\-]*))([\;]?)(.*)', $value, $temp)) {1422 while (preg_match('/(([A-Z\-]*)[=]([[:alnum:] \_\)\(\/\$\.\,\:\\\|\*\&\^\%\#\!\~\"\?\&\@\<\>\-]*))([\;]?)(.*)/', $value, $temp)) { 1423 1423 $this->debug('Value : ' . _debug_array($temp, False)); 1424 1424 $this->debug('Param ' . $temp[2] . ' Value : ' . $temp[3]); … … 2347 2347 // } 2348 2348 2349 ereg($property_regexp, $text, $temp);2349 preg_match("/$property_regexp/", $text, $temp); 2350 2350 //$this->debug ('Majortype dump: '._debug_array($temp, false) ); 2351 2351 $majortype = str_replace('-', '_', strtolower($temp[1])); … … 2381 2381 if (isset ($_f_['day_raw']) OR $_f_['day_raw']) { 2382 2382 // Days 2383 // if( ereg('D', $_f_['day_raw']))2383 // if(preg_match('/D/', $_f_['day_raw'])) 2384 2384 if (strstr($_f_['day_raw'], 'D')) { 2385 2385 $dur['days'] = eregi_replace("([0-9]+)D(.*)", "\\1", $_f_['day_raw']); … … 2387 2387 2388 2388 // Weeks 2389 // if( ereg("W", $_f_["day_raw"]))2389 // if(preg_match('/W/', $_f_["day_raw"])) 2390 2390 if (strstr($_f_['day_raw'], 'W')) { 2391 2391 $dur['weeks'] = eregi_replace("([^|.*]+D)?([0-9]+)W", "\\2", $_f_['day_raw']); … … 2396 2396 if (isset ($_f_['time_raw']) OR $_f_['time_raw']) { 2397 2397 // Hours 2398 // if( ereg("H", $_f_["time_raw"]))2398 // if(preg_match('/H/', $_f_["time_raw"])) 2399 2399 if (strstr($_f_['time_raw'], 'H')) { 2400 2400 $dur['hours'] = eregi_replace("([0-9]+)H(.*)", "\\1", $_f_['time_raw']); … … 2403 2403 // Minutes 2404 2404 /* If you find better, contact me very quickly :) */ 2405 // if( ereg("M", $_f_["time_raw"]))2405 // if(preg_match('/M/', $_f_["time_raw"])) 2406 2406 if (strstr($_f_['time_raw'], 'M')) { 2407 2407 $dur['minutes'] = eregi_replace("([^|.*]+H)?([0-9]+)M(.*)", "\\2", $_f_['time_raw']); … … 2410 2410 // Seconds 2411 2411 /* Same comment :) */ 2412 // if( ereg("S", $_f_["time_raw"]) )2412 // if(preg_match('/S/', $_f_["time_raw"]) ) 2413 2413 if (strstr($_f_['time_raw'], 'S')) { 2414 2414 $dur['seconds'] = eregi_replace("([^|.*]+M)?([0-9]+)S(.*)", "\\2", $_f_['time_raw']); -
trunk/calendar/inc/class.uicalendar.inc.php
r5316 r5921 4593 4593 foreach($vars['participants']['data'] as $user => $str) 4594 4594 { 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)) 4596 4596 { 4597 4597 $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 377 377 378 378 //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})/' 380 380 ,$v, $rr)) return parent::UnixDate($v); 381 381 … … 394 394 //11.02.2001 Toni Tunkkari toni.tunkkari@finebyte.com 395 395 //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})/' 397 397 ,$v, $rr)) return parent::UnixTimeStamp($v); 398 398 if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; -
trunk/phpgwapi/inc/class.soapmsg.inc.php
r5912 r5921 144 144 /* 145 145 // 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)) 147 147 { 148 148 // get error data -
trunk/phpgwapi/inc/class.vfs_dav.inc.php
r5912 r5921 519 519 { 520 520 $base_sep = $sep; 521 if ( ereg ("^$this->basedir" . $sep, $string))521 if (preg_match("/^$this->basedir/" . $sep, $string)) 522 522 { 523 523 $base = $this->basedir . $sep; … … 585 585 while (list ($num, $link_info) = each ($this->linked_dirs)) 586 586 { 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'])) 588 588 { 589 589 $rarray['real_full_path'] = ereg_replace ("^$this->basedir", '', $rarray['real_full_path']); … … 764 764 765 765 /* Let's not return // */ 766 while ( ereg ($sep . $sep, $basedir))766 while (preg_match("/$sep"."$sep/", $basedir)) 767 767 { 768 768 $basedir = ereg_replace ($sep . $sep, $sep, $basedir); … … 1776 1776 'relatives' => array ($f->mask) 1777 1777 ) == 'Directory')) 1778 && ereg ("^$f->fake_full_path", $t->fake_full_path)1778 && preg_match("/^$f->fake_full_path/", $t->fake_full_path) 1779 1779 ) 1780 1780 { … … 2048 2048 2049 2049 /* We don't allow /'s in dir names, of course */ 2050 if ( ereg ('/', $p->fake_name))2050 if (preg_match('/\//', $p->fake_name)) 2051 2051 { 2052 2052 return False; … … 2279 2279 ); 2280 2280 } 2281 elseif ( ereg("+^$this->fakebase\/(.*)$+U", $p->fake_full_path, $matches))2281 elseif (preg_match("/+^$this->fakebase\/(.*)$+U/", $p->fake_full_path, $matches)) 2282 2282 { 2283 2283 $set_attributes_array = Array( … … 2502 2502 */ 2503 2503 /* 2504 if (@! ereg ('^' . $file_array['directory'], $p->fake_full_path))2504 if (@!preg_match("/^$file_array['directory']/", $p->fake_full_path)) 2505 2505 { 2506 2506 continue; -
trunk/phpgwapi/inc/class.vfs_shared.inc.php
r5912 r5921 759 759 760 760 /* Let's not return // */ 761 while ( ereg ($sep . $sep, $basedir))761 while (preg_match("/$sep"."$sep/", $basedir)) 762 762 { 763 763 $basedir = ereg_replace ($sep . $sep, $sep, $basedir); … … 1028 1028 while (list ($num, $link_info) = each ($this->linked_dirs)) 1029 1029 { 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'])) 1031 1031 { 1032 1032 $rarray['real_full_path'] = ereg_replace ("^$this->basedir", '', $rarray['real_full_path']); -
trunk/phpgwapi/inc/class.vfs_sql.inc.php
r5164 r5921 1522 1522 'relatives' => array ($f->mask) 1523 1523 ) == 'Directory')) 1524 && ereg ("^$f->fake_full_path", $t->fake_full_path)1524 && preg_match("/^$f->fake_full_path/", $t->fake_full_path) 1525 1525 ) 1526 1526 { … … 1889 1889 1890 1890 /* We don't allow /'s in dir names, of course */ 1891 if ( ereg ("/", $p->fake_name))1891 if (preg_match('/\//', $p->fake_name)) 1892 1892 { 1893 1893 return False; … … 2491 2491 */ 2492 2492 /* 2493 if (@! ereg ('^' . $file_array['directory'], $p->fake_full_path))2493 if (@!preg_match("/^$file_array['directory']/", $p->fake_full_path)) 2494 2494 { 2495 2495 continue; -
trunk/phpgwapi/inc/fpdf/tutorial/tuto6.php
r2 r5921 48 48 $attr=array(); 49 49 foreach($a2 as $v) 50 if( ereg('^([^=]*)=["\']?([^"\']*)["\']?$',$v,$a3))50 if(preg_match('/^([^=]*)=["\']?([^"\']*)["\']?$/',$v,$a3)) 51 51 $attr[strtoupper($a3[1])]=$a3[2]; 52 52 $this->OpenTag($tag,$attr); -
trunk/phpgwapi/templates/news/login_news.php
r5159 r5921 343 343 foreach($_GET as $name => $value) 344 344 { 345 if( ereg('phpgw_',$name))345 if(preg_match('/phpgw_/',$name)) 346 346 { 347 347 $extra_vars .= '&' . $name . '=' . urlencode($value); -
trunk/preferences/templates/default/changepassword_default.php
r5509 r5921 42 42 { 43 43 $letter = $n_passwd[$i]; 44 if (! ereg ("[a-zA-Z]", $letter ) )44 if (!preg_match("/[a-zA-Z]/", $letter ) ) 45 45 $speccial_letter++; 46 46 } -
trunk/reports/inc/class.uireports.inc.php
r5291 r5921 97 97 $newval = str_replace(' ','_',$newval); 98 98 /* 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)) 100 100 { 101 101 $t->set_var($value,''); -
trunk/setup/manageheader.php
r3991 r5921 31 31 */ 32 32 $realpath = realpath('..'); 33 if(! ereg('^' . $_SERVER['DOCUMENT_ROOT'],$realpath))33 if(!preg_match("/^$_SERVER['DOCUMENT_ROOT']/",$realpath)) 34 34 { 35 35 if(PHP_OS == 'Windows') -
trunk/workflow/inc/class.BrowserInfo.inc.php
r795 r5921 115 115 $bd['version'] = "1.0"; 116 116 $var = stristr($agent, "/"); 117 if ( ereg("308|425|426|474|0b1", $var))117 if (preg_match('/308|425|426|474|0b1/', $var)) 118 118 $bd['version'] = "1.5"; 119 119 -
trunk/workflow/inc/class.basemodel.inc.php
r3167 r5921 127 127 foreach ($attributes as $attribute => $value) { 128 128 /* parses only process-level attributes, whose names start with a _ signal */ 129 if ( ereg('^_{1}', $attribute)) {129 if (preg_match('/^_{1}/', $attribute)) { 130 130 $result[$attribute] = $this->{$attribute}; 131 131 } -
trunk/workflow/inc/class.bo_monitors.inc.php
r3167 r5921 1248 1248 { 1249 1249 /* split the e-mail according to definition */ 1250 ereg('(.*)%inicio_loop%(.*)%fim_loop%(.*)', $emailBody, $records);1250 preg_match('/(.*)%inicio_loop%(.*)%fim_loop%(.*)/', $emailBody, $records); 1251 1251 if (($records == null) || (count($records) != 4)) 1252 1252 return array('error' => 'Formato de e-mail inválido'); -
trunk/workflow/inc/class.bo_orgchart.inc.php
r3167 r5921 464 464 function searchEmployee($params) 465 465 { 466 if (! ereg('^([[:alnum:] ]+)$', $params['search_term']))466 if (!preg_match('/^([[:alnum:] ]+)$/', $params['search_term'])) 467 467 die(serialize("Parametro de busca inválido")); 468 468 $result = $this->so->searchEmployee($params['search_term'], $params['organizacao_id']); -
trunk/workflow/inc/class.bo_userinterface.inc.php
r3167 r5921 920 920 function searchEmployee($params) 921 921 { 922 if (! ereg('^([[:alnum:] -]+)$', $params['searchTerm']))922 if (!preg_match('/^([[:alnum:] -]+)$/', $params['searchTerm'])) 923 923 return array('error' => 'Parâmetro de busca inválido'); 924 924 -
trunk/workflow/inc/class.powergraphic.inc.php
r3167 r5921 298 298 $this->latin_notation = ((isset($_GET['latin_notation'])) && ($_GET['latin_notation'] == 1)) ? true : false; 299 299 300 $this->legend_exists = ( ereg("(5|6)", $this->type)) ? true : false;300 $this->legend_exists = (preg_match('/(5|6)/', $this->type)) ? true : false; 301 301 $this->biggest_graphic_name = (strlen($this->graphic_1) > strlen($this->graphic_2)) ? $this->graphic_1 : $this->graphic_2; 302 302 $this->height_title = (!empty($this->title)) ? ($this->string_height(5) + 15) : 0; … … 367 367 $temp[$num] = $value; 368 368 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))) 370 370 { 371 371 $this->graphic_2_exists = true; … … 449 449 450 450 // 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)) 452 452 { 453 453 if ($this->legend_exists == true) … … 525 525 526 526 // Draw legend box for "pie" or "donut" 527 else if ( ereg("^(5|6)$", $this->type))527 else if (preg_match('/^(5|6)$/', $this->type)) 528 528 { 529 529 $this->draw_legend(); … … 615 615 * Draw graphic: DOTS or LINE 616 616 */ 617 else if ( ereg("^(3|4)$", $this->type))617 else if (preg_match('/^(3|4)$/', $this->type)) 618 618 { 619 619 … … 680 680 * Draw graphic: PIE or DONUT 681 681 */ 682 else if ( ereg("^(5|6)$", $this->type))682 else if (preg_match('/^(5|6)$/', $this->type)) 683 683 { 684 684 $center_x = ($this->graphic_area_x1 + $this->graphic_area_x2) / 2; … … 909 909 910 910 // 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']; 915 915 916 916 imagefilledrectangle($this->img, $x, $y, ($x+10), ($y+10), $color_1); … … 924 924 925 925 // Draw legend values for PIE or DONUT 926 else if ( ereg("^(5|6)$", $this->type))926 else if (preg_match('/^(5|6)$/', $this->type)) 927 927 { 928 928 if (!empty($this->axis_x)) … … 1050 1050 $this->color['bg_legend'] = imagecolorallocate($this->img, 205, 205, 205); 1051 1051 1052 if ( ereg("^(1|2)$", $this->type))1052 if (preg_match('/^(1|2)$/', $this->type)) 1053 1053 { 1054 1054 $this->color['bars'] = imagecolorallocate($this->img, 100, 150, 200); … … 1057 1057 $this->color['bars_2_shadow'] = imagecolorallocate($this->img, 120, 170, 70); 1058 1058 } 1059 else if ( ereg("^(3|4)$", $this->type))1059 else if (preg_match('/^(3|4)$/', $this->type)) 1060 1060 { 1061 1061 $this->color['line'] = imagecolorallocate($this->img, 100, 150, 200); 1062 1062 $this->color['line_2'] = imagecolorallocate($this->img, 230, 100, 100); 1063 1063 } 1064 else if ( ereg("^(5|6)$", $this->type))1064 else if (preg_match('/^(5|6)$/', $this->type)) 1065 1065 { 1066 1066 $this->color['arc_1'] = imagecolorallocate($this->img, 100, 150, 200); … … 1090 1090 $this->color['bg_legend'] = imagecolorallocate($this->img, 70, 70, 70); 1091 1091 1092 if ( ereg("^(1|2)$", $this->type))1092 if (preg_match('/^(1|2)$/', $this->type)) 1093 1093 { 1094 1094 $this->color['bars'] = imagecolorallocate($this->img, 50, 200, 50); … … 1097 1097 $this->color['bars_2_shadow'] = imagecolorallocate($this->img, 220, 220, 220); 1098 1098 } 1099 else if ( ereg("^(3|4)$", $this->type))1099 else if (preg_match('/^(3|4)$/', $this->type)) 1100 1100 { 1101 1101 $this->color['line'] = imagecolorallocate($this->img, 220, 220, 220); 1102 1102 $this->color['line_2'] = imagecolorallocate($this->img, 0, 180, 0); 1103 1103 } 1104 else if ( ereg("^(5|6)$", $this->type))1104 else if (preg_match('/^(5|6)$/', $this->type)) 1105 1105 { 1106 1106 $this->color['arc_1'] = imagecolorallocate($this->img, 255, 255, 255); … … 1131 1131 $this->color['bg_legend'] = imagecolorallocate($this->img, 230, 230, 200); 1132 1132 1133 if ( ereg("^(1|2)$", $this->type))1133 if (preg_match('/^(1|2)$/', $this->type)) 1134 1134 { 1135 1135 $this->color['bars'] = imagecolorallocate($this->img, 255, 170, 80); … … 1138 1138 $this->color['bars_2_shadow'] = imagecolorallocate($this->img, 180, 150, 0); 1139 1139 } 1140 else if ( ereg("^(3|4)$", $this->type))1140 else if (preg_match('/^(3|4)$/', $this->type)) 1141 1141 { 1142 1142 $this->color['line'] = imagecolorallocate($this->img, 230, 100, 0); -
trunk/workflow/inc/class.utils.url.php
r795 r5921 157 157 return NULL; 158 158 } 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)) { 160 160 return gethostbyaddr($this->host); 161 161 } else { … … 320 320 $url = $this->getUrl(); 321 321 // busca a string de parametros 322 if ( ereg("([^?#]+\??)?([^#]+)?(.*)", $url, $matches)) {322 if (preg_match('/([^?#]+\??)?([^#]+)?(.*)/', $url, $matches)) { 323 323 if (!$this->isFalse($matches[2])) { 324 324 // codifica os parametros … … 346 346 $url = $this->getUrl(); 347 347 // busca os parï¿œmetros codificados 348 ereg("([^?#]+\??)?([^#]+)?(.*)", $url, $matches);348 preg_match('/([^?#]+\??)?([^#]+)?(.*)/', $url, $matches); 349 349 if (!$this->isFalse($matches[2])) { 350 350 parse_str($matches[2], $vars); -
trunk/workflow/inc/engine/src/ProcessManager/ProcessManager.php
r4740 r5921 480 480 } 481 481 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) 483 483 { 484 484 $msg = tra('invalid version specified'); -
trunk/workflow/inc/local/classes/class.wf_date.php
r795 r5921 76 76 function isEuroDate($date, &$regs) { 77 77 $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)) { 79 79 $regs = array( 80 80 $matches[0], … … 96 96 function isUsDate($date, &$regs) { 97 97 $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)) { 99 99 $regs = array( 100 100 $matches[0], … … 116 116 function isSqlDate($date, &$regs) { 117 117 $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)) { 119 119 $regs = array( 120 120 $matches[0], -
trunk/workflow/inc/local/classes/class.wf_regex.php
r795 r5921 523 523 { 524 524 if ( $caseSensitive ) 525 return( ereg( $pattern, (string) $input ) );525 return( preg_match("/$pattern/", (string) $input ) ); 526 526 else 527 527 return( eregi( $pattern, (string) $input ) ); -
trunk/workflow/inc/local/functions/function.wf_handle_download.php
r795 r5921 35 35 if (isset($fileResult['filename']) && isset($fileResult['content'])) 36 36 { 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'])) 38 38 $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'])) 40 40 $UserBrowser = "IE"; 41 41 else
Note: See TracChangeset
for help on using the changeset viewer.