Changeset 5921 for trunk/workflow
- Timestamp:
- 04/11/12 17:21:30 (12 years ago)
- Location:
- trunk/workflow/inc
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
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.