Changeset 5912
- Timestamp:
- 04/11/12 12:04:21 (12 years ago)
- Location:
- trunk
- Files:
-
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/inc/class.boaccess_history.inc.php
r2 r5912 54 54 } 55 55 56 if ( ereg('@',$record['loginid']))56 if (preg_match('/@/',$record['loginid'])) 57 57 { 58 58 $t = split('@',$record['loginid']); -
trunk/admin/inc/class.bocurrentsessions.inc.php
r2 r5912 31 31 while (list(,$value) = @each($values)) 32 32 { 33 if ( ereg('@',$value['session_lid']))33 if (preg_match('/@/',$value['session_lid'])) 34 34 { 35 35 $t = split('@',$value['session_lid']); -
trunk/calendar/csv_import.php
r204 r5912 373 373 foreach($trans[$csv_idx] as $pattern => $replace) 374 374 { 375 if ( ereg((string) $pattern,$val))375 if (preg_match((string) '/'.$pattern.'/',$val)) 376 376 { 377 377 // echo "<p>csv_idx='$csv_idx',info='$info',trans_csv=".print_r($trans_csv).",ereg_replace('$pattern','$replace','$val') = "; … … 380 380 381 381 $reg = $CPreReg.'([a-zA-Z_0-9]+)'.$CPosReg; 382 while ( ereg($reg,$val,$vars))382 while (preg_match('/'.$reg.'/',$val,$vars)) 383 383 { // expand all CSV fields 384 384 $val = str_replace($CPre.$vars[1].$CPos,$val[0] == '@' ? "'".addslashes($fields[array_search($vars[1],$csv_fields)])."'" : $fields[array_search($vars[1],$csv_fields)],$val); … … 464 464 $values[$date] = ereg_replace('([0-9]{2}).([0-9]{2}).([0-9]{4})','\3-\2-\1',$values[$date]); 465 465 // remove fractures of seconds if present at the end of the string 466 if ( ereg('(.*)\.[0-9]+',$values[$date],$parts)) $values[$date] = $parts[1];466 if (preg_match('/(.*)\.[0-9]+/',$values[$date],$parts)) $values[$date] = $parts[1]; 467 467 $values[$date] = strtotime($values[$date]); 468 468 } -
trunk/contactcenter/inc/class.abo_catalog.inc.php
r5131 r5912 356 356 for($k = 0; $k < $n_joins; $k++) 357 357 { 358 if ( ereg($query_join_reg,$query_fields_joins[$k]))358 if (preg_match('/'.$query_join_reg.'/',$query_fields_joins[$k])) 359 359 { 360 360 $unique = false; … … 430 430 for($k = 0; $k < $n_joins; $k++) 431 431 { 432 if ( ereg($query_join_reg,$query_restric_joins[$k]))432 if (preg_match('/'.$query_join_reg.'/',$query_restric_joins[$k])) 433 433 { 434 434 $unique = false; -
trunk/contactcenter/inc/class.ui_preferences.inc.php
r3707 r5912 122 122 foreach($vars as $name => $value) 123 123 { 124 if ( ereg('^lang_', $name) !== false)124 if (preg_match('/^lang_/', $name) !== false) 125 125 { 126 126 $GLOBALS['phpgw']->template->set_var($name, lang(str_replace('_',' ',substr($name, 5)))); -
trunk/expressoMail1_2/login_offline.php
r1932 r5912 251 251 /*foreach($_GET as $name => $value) 252 252 { 253 if( ereg('phpgw_',$name))253 if(preg_match('/phpgw_/',$name)) 254 254 { 255 255 $extra_vars .= '&' . $name . '=' . urlencode($value); -
trunk/filemanager/inc/class.bofilemanager.inc.php
r5509 r5912 227 227 } 228 228 } 229 elseif ($this->hostname != "" && ereg('^'.$this->hostname, $string))229 elseif ($this->hostname != "" && preg_match('/^/'.$this->hostname, $string)) 230 230 // elseif (ereg ('^'.$this->hostname, $string)) 231 231 { -
trunk/filemanager/inc/class.vfs_functions.inc.php
r5509 r5912 436 436 $_return[] = array( "error" => $badchar); 437 437 } 438 if( ereg("/", $this->to) || ereg("\\\\", $this->to))438 if(preg_match('/\//', $this->to) || preg_match('/\\\\/', $this->to)) 439 439 { 440 440 $_return[] = array( "error"=> "slashes"); -
trunk/listAdmin/docs/manageheader.php
r3514 r5912 30 30 */ 31 31 $realpath = realpath('..'); 32 if(! ereg('^' . $_SERVER['DOCUMENT_ROOT'],$realpath))32 if(!preg_match('/^/' . $_SERVER['DOCUMENT_ROOT'],$realpath)) 33 33 { 34 34 if(PHP_OS == 'Windows') -
trunk/listAdmin/inc/sieve-php.lib.php
r3514 r5912 372 372 //So, if we see IMLEMENTATION in the first line, then we are done. 373 373 374 if( ereg("IMPLEMENTATION",$this->line))374 if(preg_match('/IMPLEMENTATION/',$this->line)) 375 375 { 376 376 //we're on the Cyrus V2 sieve server … … 767 767 //So, if we see IMLEMENTATION in the first line, then we are done. 768 768 769 if( ereg("IMPLEMENTATION",$this->line))769 if(preg_match('/IMPLEMENTATION/',$this->line)) 770 770 { 771 771 //we're on the Cyrus V2 sieve server -
trunk/mobile/inc/class.ui_preferences.inc.php
r4277 r5912 58 58 foreach($vars as $name => $value) 59 59 { 60 if ( ereg('^lang_', $name) !== false)60 if (preg_match('/^lang_/', $name) !== false) 61 61 { 62 62 $GLOBALS['phpgw']->template->set_var($name, lang(str_replace('_',' ',substr($name, 5)))); -
trunk/phpgwapi/inc/class.clientsniffer.inc.php
r2 r5912 237 237 $this->OS = 'hpux'; 238 238 } 239 if(eregi('hp-ux',$this->UA) && ereg('10.',$this-UA))239 if(eregi('hp-ux',$this->UA) && preg_match('/10./',$this-UA)) 240 240 { 241 241 $this->PLATFORM = 'Unix'; 242 242 $this->OS = 'hpux10'; 243 243 } 244 elseif(eregi('hp-ux',$this->UA) && ereg('09.',$this-UA))244 elseif(eregi('hp-ux',$this->UA) && preg_match('/09./',$this-UA)) 245 245 { 246 246 $this->PLATFORM = 'Unix'; -
trunk/phpgwapi/inc/class.common.inc.php
r5141 r5912 58 58 function cmp_version($str1,$str2,$debug=False) 59 59 { 60 ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)",$str1,$regs);61 ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)",$str2,$regs2);60 preg_match('/([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)/',$str1,$regs); 61 preg_match('/([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)/',$str2,$regs2); 62 62 if($debug) { echo "<br>$regs[0] - $regs2[0]"; } 63 63 … … 89 89 function cmp_version_long($str1,$str2,$debug=False) 90 90 { 91 ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)\.([0-9]*)",$str1,$regs);92 ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)\.([0-9]*)",$str2,$regs2);91 preg_match('/([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)\.([0-9]*)/',$str1,$regs); 92 preg_match('/([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)\.([0-9]*)/',$str2,$regs2); 93 93 if($debug) { echo "<br>$regs[0] - $regs2[0]"; } 94 94 … … 456 456 /* 457 457 $s = '<a href="' . $GLOBALS['phpgw']->link($link,$extravars) . '"> ' . lang($label) . ' </a>'; 458 if ( ereg('^[0-9]+$',$record))458 if (preg_match('/^[0-9]+$/',$record)) 459 459 { 460 460 if ($record != $GLOBALS['phpgw_info']['user']['account_id']) -
trunk/phpgwapi/inc/class.graphics.inc.php
r2 r5912 87 87 while( list($key, $val) = each($HTTP_POST_VARS)) 88 88 { 89 if ( ereg("(.*)_x",$key,$varName) && $HTTP_POST_VARS[$varName[1]."_y"])89 if (preg_match('/(.*)_x/',$key,$varName) && $HTTP_POST_VARS[$varName[1]."_y"]) 90 90 { 91 91 $name = $varName[1]; -
trunk/phpgwapi/inc/class.http.inc.php
r2 r5912 459 459 break; 460 460 case 'expires': 461 if( ereg("^((Mon|Monday|Tue|Tuesday|Wed|Wednesday|Thu|Thursday|Fri|Friday|Sat|Saturday|Sun|Sunday), )?([0-9]{2})\\-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\-([0-9]{2,4}) ([0-9]{2})\\:([0-9]{2})\\:([0-9]{2}) GMT$",$value,$matches))461 if(preg_match('/^((Mon|Monday|Tue|Tuesday|Wed|Wednesday|Thu|Thursday|Fri|Friday|Sat|Saturday|Sun|Sunday), )?([0-9]{2})\\-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\-([0-9]{2,4}) ([0-9]{2})\\:([0-9]{2})\\:([0-9]{2}) GMT$/',$value,$matches)) 462 462 { 463 463 $year = (int)$matches[5]; -
trunk/phpgwapi/inc/class.http_dav_client.inc.php
r2 r5912 151 151 foreach ($attr as $name => $value) 152 152 { 153 if ( ereg('^XMLNS:(.*)', $name, $matches) )153 if (preg_match('/^XMLNS:(.*)/', $name, $matches) ) 154 154 { 155 155 $this->namespaces[$matches[1]] = $value; -
trunk/phpgwapi/inc/class.network.inc.php
r2 r5912 164 164 } 165 165 $response = $this->read_port(); 166 if(! ereg(strtoupper($expected_response),strtoupper($response)))166 if(!preg_match('/'.strtoupper($expected_response).'/',strtoupper($response))) 167 167 { 168 168 if(substr($expected_response,1,1) == '+') -
trunk/phpgwapi/inc/class.sbox.inc.php
r588 r5912 276 276 ); 277 277 278 if ( ereg(",", $selected))278 if (preg_match('/,/', $selected)) 279 279 { 280 280 $selected = "group"; … … 313 313 } 314 314 } 315 elseif ( ereg(",". $group['account_id'] . ",", $selected))315 elseif (preg_match('/,/' . $group['account_id'] . ",", $selected)) 316 316 { 317 317 $out .= " SELECTED"; -
trunk/phpgwapi/inc/class.soap_client.inc.php
r2 r5912 53 53 54 54 // endpoint mangling 55 if( ereg("^http://",$path))55 if(preg_match('/^http:\/\//',$path)) 56 56 { 57 57 $path = str_replace('http://','',$path); 58 58 $this->path = strstr($path,'/'); 59 59 $this->debug("path = $this->path"); 60 if( ereg(':',$path))60 if(preg_match('/:/',$path)) 61 61 { 62 62 $this->server = substr($path,0,strpos($path,':')); -
trunk/phpgwapi/inc/class.soap_parser.inc.php
r5509 r5912 143 143 144 144 // set status 145 if( ereg(":Envelope$",$name))145 if(preg_match('/:Envelope$/',$name)) 146 146 { 147 147 $this->status = 'envelope'; 148 148 } 149 elseif( ereg(":Header$",$name))149 elseif(preg_match('/:Header$/',$name)) 150 150 { 151 151 $this->status = 'header'; 152 152 } 153 elseif( ereg(":Body$",$name))153 elseif(preg_match('/:Body$/',$name)) 154 154 { 155 155 $this->status = 'body'; … … 159 159 { 160 160 $this->status = 'method'; 161 if( ereg(':',$name))161 if(preg_match('/:/',$name)) 162 162 { 163 163 $this->root_struct_name = substr(strrchr($name,':'),1); … … 178 178 $this->message[$pos]['attrs'] = $attrs; 179 179 // get namespace 180 if( ereg(":",$name))180 if(preg_match('/:/',$name)) 181 181 { 182 182 $namespace = substr($name,0,strpos($name,':')); … … 194 194 { 195 195 // if ns declarations, add to class level array of valid namespaces 196 if( ereg('xmlns:',$key))196 if(preg_match('/xmlns:/',$key)) 197 197 { 198 198 $namespaces[substr(strrchr($key,':'),1)] = $value; … … 289 289 $this->status = 'body'; 290 290 } 291 elseif( ereg(':Body',$name))291 elseif(preg_match('/:Body/',$name)) 292 292 { 293 293 $this->status = 'header'; 294 294 } 295 elseif( ereg(':Header',$name))295 elseif(preg_match('/:Header/',$name)) 296 296 { 297 297 $this->status = 'envelope'; -
trunk/phpgwapi/inc/class.soap_server.inc.php
r5509 r5912 92 92 { 93 93 $action = str_replace('"','',$headers_array["SOAPAction"]); 94 if( ereg("^urn:",$action))94 if(preg_match('/^urn:/',$action)) 95 95 { 96 96 $this->service = substr($action,4); 97 97 } 98 elseif( ereg(".php",$action))98 elseif(preg_match('/.php/',$action)) 99 99 { 100 100 $this->service = ereg_replace('"|/','',substr(strrchr($action,".php"),4,strlen(strrchr($action,"/")))); … … 126 126 /* egroupware customization - createobject based on methodname */ 127 127 list($app,$class,$method) = explode('.',$this->methodname); 128 if( ereg("^service",$app))128 if(preg_match('/^service/',$app)) 129 129 { 130 130 $args = $class; -
trunk/phpgwapi/inc/class.soapmsg.inc.php
r5509 r5912 122 122 // strip headers here 123 123 //$clean_data = ereg_replace("\r\n","\n", $data); 124 if( ereg("^.*\r\n\r\n<",$data))124 if(preg_match('/^.*\r\n\r\n</',$data)) 125 125 { 126 126 $this->debug("found proper seperation of headers and document"); … … 144 144 /* 145 145 // if response is a proper http response, and is not a 200 146 if( ereg("^HTTP",$clean_data) && !ereg("200$", $clean_data))146 if(preg_match('/^HTTP/',$clean_data) && !ereg("200$", $clean_data)) 147 147 { 148 148 // get error data -
trunk/phpgwapi/inc/class.soapval.inc.php
r5509 r5912 54 54 if(is_array($value) && count($value) >= 1) 55 55 { 56 if( ereg("[a-zA-Z0-9\-]*",key($v)))56 if(preg_match('/[a-zA-Z0-9\-]*/',key($v))) 57 57 { 58 58 $type = 'struct'; … … 104 104 105 105 // get type prefix 106 if( ereg(":",$type))106 if(preg_match('/:/',$type)) 107 107 { 108 108 $this->type = substr(strrchr($type,':'),1,strlen(strrchr($type,':'))); … … 199 199 if(is_array($v)) 200 200 { 201 if( ereg("[a-zA-Z\-]*",key($v)))201 if(preg_match('/[a-zA-Z\-]*/',key($v))) 202 202 { 203 203 $type = 'struct'; … … 208 208 } 209 209 } 210 elseif(! ereg("^[0-9]*$",$k) && in_array($k,array_keys($this->soapTypes)))210 elseif(!preg_match('/^[0-9]*$/',$k) && in_array($k,array_keys($this->soapTypes))) 211 211 { 212 212 $type = $k; -
trunk/phpgwapi/inc/class.vfs_dav.inc.php
r3863 r5912 2279 2279 ); 2280 2280 } 2281 elseif ( preg_match("+^$this->fakebase\/(.*)$+U", $p->fake_full_path, $matches))2281 elseif (ereg("+^$this->fakebase\/(.*)$+U", $p->fake_full_path, $matches)) 2282 2282 { 2283 2283 $set_attributes_array = Array( … … 2372 2372 for($i=0;$i<sizeof($contents);$i++) 2373 2373 { 2374 if (! ereg("^#",$contents[$i]))2374 if (!preg_match('/^#/',$contents[$i])) 2375 2375 { 2376 2376 $line=split("[[:space:]]+", $contents[$i]); … … 2594 2594 ); 2595 2595 2596 if ($data['checksubdirs']==False && ereg('.*/$', $data['string']) && $data['nofiles'] )2596 if ($data['checksubdirs']==False && preg_match('/.*\/$/', $data['string']) && $data['nofiles'] ) 2597 2597 { 2598 2598 $this->debug('Returning empty for'.$data['string']); -
trunk/phpgwapi/inc/class.vfs_shared.inc.php
r5164 r5912 795 795 for($i=0;$i<sizeof($contents);$i++) 796 796 { 797 if (! ereg("^#",$contents[$i]))797 if (!preg_match('/^#/',$contents[$i])) 798 798 { 799 799 $line=split("[[:space:]]+", $contents[$i]); -
trunk/phpgwapi/inc/class.wsdl.inc.php
r5509 r5912 215 215 } 216 216 // get element prefix 217 if( ereg(":",$name))217 if(preg_match('/:/',$name)) 218 218 { 219 219 $prefix = substr($name,0,strpos($name,':')); -
trunk/phpgwapi/inc/class.xml.inc.php
r5509 r5912 504 504 { 505 505 // Check whether the node is an attribute node. 506 if ( ereg("/attribute::", $node) )506 if ( preg_match('/\/attribute::/', $node) ) 507 507 { 508 508 // Get the path to the attribute node's parent. … … 622 622 { 623 623 // Check whether it's an attribute node. 624 if ( ereg("/attribute::", $path) )624 if ( preg_match('/\/attribute::/', $path) ) 625 625 { 626 626 // Get the path to the attribute node's parent. … … 659 659 { 660 660 // Check whether it's an attribute node. 661 if ( ereg("/attribute::", $path) )661 if ( preg_match('/\/attribute::/', $path) ) 662 662 { 663 663 // Get the path to the attribute node's parent. … … 698 698 { 699 699 // Check whether it's an attribute node. 700 if ( ereg("/attribute::", $path) )700 if ( preg_match('/\/attribute::/', $path) ) 701 701 { 702 702 // Get the path to the attribute node's parent. … … 1063 1063 1064 1064 // Check whether there are predicates. 1065 if ( ereg("\[", $step) )1065 if ( preg_match('/\[/', $step) ) 1066 1066 { 1067 1067 // Get the predicates. … … 1109 1109 $axis["node-test"] = "*"; 1110 1110 } 1111 elseif ( ereg("\(", $step) )1111 elseif ( preg_match('/\(/', $step) ) 1112 1112 { 1113 1113 // Check whether it's a function. … … 1164 1164 $axis["node-test"] = "*"; 1165 1165 } 1166 elseif ( ereg("^[a-zA-Z0-9\-_]+$", $step) )1166 elseif ( preg_match('/^[a-zA-Z0-9\-_]+$/', $step) ) 1167 1167 { 1168 1168 // Select the child axis and the child. … … 1506 1506 { 1507 1507 // Check whether there's a - sign in the function name. 1508 if ( ereg("-", $function) )1508 if ( preg_match('/-/', $function) ) 1509 1509 { 1510 1510 // Get the position of the - in the function name. … … 1625 1625 1626 1626 // Check whether the predicate is a function. 1627 if ( ereg("\(", $predicate) )1627 if ( preg_match('/\(/', $predicate) ) 1628 1628 { 1629 1629 // Get the position of the first bracket. … … 1674 1674 1675 1675 // Check whether the predicate is just a digit. 1676 if ( ereg("^[0-9]+(\.[0-9]+)?$", $predicate) ||1677 ereg("^\.[0-9]+$", $predicate) )1676 if ( preg_match('/^[0-9]+(\.[0-9]+)?$/', $predicate) || 1677 preg_match('/^\.[0-9]+$/', $predicate) ) 1678 1678 { 1679 1679 // Return the value of the digit. … … 1728 1728 { 1729 1729 // Check whether the predicate is just an number. 1730 if ( ereg("^[0-9]+$", $predicate) )1730 if ( preg_match('/^[0-9]+$/', $predicate) ) 1731 1731 { 1732 1732 // Enhance the predicate. … … 1796 1796 { 1797 1797 // Check whether it's a function. 1798 if ( ereg("\(", $node_test) )1798 if ( preg_match('/\(/', $node_test) ) 1799 1799 { 1800 1800 // Get the type of function to use. … … 1872 1872 return true; 1873 1873 } 1874 elseif ( ereg("^[a-zA-Z0-9\-_]+", $node_test) )1874 elseif ( preg_match('/^[a-zA-Z0-9\-_]+/', $node_test) ) 1875 1875 { 1876 1876 // Check whether the node-test can be fulfilled. … … 2602 2602 { 2603 2603 // Check what type of parameter is given 2604 if ( ereg("^[0-9]+(\.[0-9]+)?$", $arguments) ||2605 ereg("^\.[0-9]+$", $arguments) )2604 if ( preg_match('/^[0-9]+(\.[0-9]+)?$/', $arguments) || 2605 preg_match('/^\.[0-9]+$/', $arguments) ) 2606 2606 { 2607 2607 // Convert the digits to a number. … … 2711 2711 2712 2712 // Check whether the first string starts with the second one. 2713 if ( ereg("^".$second, $first) )2713 if ( preg_match('/^/'.$second, $first) ) 2714 2714 { 2715 2715 // Return true. … … 2749 2749 2750 2750 // Check whether the first string starts with the second one. 2751 if ( ereg($second, $first) )2751 if ( preg_match('/'.$second.'/', $first) ) 2752 2752 { 2753 2753 // Return true. … … 2945 2945 2946 2946 // Check what type of parameter is given 2947 if ( ereg("^[0-9]+(\.[0-9]+)?$", $arguments) ||2948 ereg("^\.[0-9]+$", $arguments) )2947 if ( preg_match('/^[0-9]+(\.[0-9]+)?$/', $arguments) || 2948 preg_match('/^\.[0-9]+$/', $arguments) ) 2949 2949 { 2950 2950 // Convert the digits to a number. … … 3138 3138 { 3139 3139 // Check the type of argument. 3140 if ( ereg("^[0-9]+(\.[0-9]+)?$", $arguments) ||3141 ereg("^\.[0-9]+$", $arguments) )3140 if ( preg_match('/^[0-9]+(\.[0-9]+)?$/', $arguments) || 3141 preg_match('/^\.[0-9]+$/', $arguments) ) 3142 3142 { 3143 3143 // Return the argument as a number. -
trunk/phpgwapi/inc/class.xmlrpc_server_epi.inc.php
r2 r5912 163 163 164 164 /* Setup dispatch map based on the function, if this is a system call */ 165 if( ereg('^system\.', $methName))165 if(preg_match('/^system\./', $methName)) 166 166 { 167 167 foreach($GLOBALS['_xmlrpcs_dmap'] as $meth => $dat) … … 172 172 $dmap = $this->dmap; 173 173 } 174 elseif( ereg('^examples\.',$methName) ||175 ereg('^validator1\.',$methName) ||176 ereg('^interopEchoTests\.', $methName)174 elseif(preg_match('/^examples\./',$methName) || 175 preg_match('/^validator1\./',$methName) || 176 preg_match('/^interopEchoTests\./', $methName) 177 177 ) 178 178 { -
trunk/phpgwapi/inc/class.xmlrpc_server_php.inc.php
r5509 r5912 247 247 $_type = (is_integer($_res) ? 'int' : gettype($_res)); 248 248 249 if ($_type == 'string' && ( ereg('^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$',$_res)250 || ereg('^[0-9]{4}[0-9]{2}[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$',$_res) ) )249 if ($_type == 'string' && (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/',$_res) 250 || preg_match('/^[0-9]{4}[0-9]{2}[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/',$_res) ) ) 251 251 { 252 252 $_type = 'dateTime.iso8601'; … … 316 316 $this->last_method = $methName; 317 317 318 if ( ereg("^system\.", $methName))318 if (preg_match('/^system\./', $methName)) 319 319 { 320 320 $dmap = $GLOBALS['_xmlrpcs_dmap']; … … 350 350 $class = $tmp[0]; 351 351 352 if ( ereg('^service',$method))352 if (preg_match('/^service/',$method)) 353 353 { 354 354 $t = 'phpgwapi.' . $class . '.exec'; … … 418 418 $this->req_array = $GLOBALS['phpgw']->translation->convert($this->req_array,'utf-8'); 419 419 //_debug_array($this->req_array); 420 if ( ereg('^service',$method))420 if (preg_match('/^service/',$method)) 421 421 { 422 422 $res = ExecMethod('phpgwapi.service.exec',array($service,$methName,$this->req_array)); -
trunk/phpgwapi/inc/class.xmlrpcmsg.inc.php
r5509 r5912 157 157 // see if we got an HTTP 200 OK, else bomb 158 158 // but only do this if we're using the HTTP protocol. 159 if ( ereg("^HTTP",$data) && !ereg("^HTTP/[0-9.]+ 200 ", $data))159 if (preg_match('/^HTTP/',$data) && !preg_match('/^HTTP/[0-9.]+ 200 /', $data)) 160 160 { 161 161 $errstr = substr($data, 0, strpos($data, "\n")-1); … … 169 169 // if using HTTP, then gotta get rid of HTTP headers here 170 170 // and we store them in the 'ha' bit of our data array 171 if ( ereg("^HTTP", $data))171 if (preg_match('/^HTTP/', $data)) 172 172 { 173 173 $ar=explode("\r\n", $data); -
trunk/phpgwapi/inc/xml_functions.inc.php
r5509 r5912 151 151 while($i<sizeof($top)) 152 152 { 153 if ( ereg("^([#a-zA-Z0-9]+);", $top[$i], $regs))153 if (preg_match('/^([#a-zA-Z0-9]+);/', $top[$i], $regs)) 154 154 { 155 155 $op .= ereg_replace("^[#a-zA-Z0-9]+;", … … 178 178 return $GLOBALS['xmlEntities'][strtolower($ent)]; 179 179 } 180 if ( ereg("^#([0-9]+)$", $ent, $regs))180 if (preg_match('/^#([0-9]+)$/', $ent, $regs)) 181 181 { 182 182 return chr($regs[1]); … … 313 313 // we have an I4, INT or a DOUBLE 314 314 // we must check that only 0123456789-.<space> are characters here 315 if (! ereg("^\-?[0123456789 \t\.]+$", $GLOBALS['_xh'][$parser]['ac']))315 if (!preg_match('/^\-?[0123456789 \t\.]+$/', $GLOBALS['_xh'][$parser]['ac'])) 316 316 { 317 317 // TODO: find a better way of throwing an error … … 387 387 function xmlrpc_cd($parser, $data) 388 388 { 389 //if ( ereg("^[\n\r \t]+$", $data)) return;389 //if (preg_match('/^[\n\r \t]+$/', $data)) return; 390 390 // print "adding [${data}]\n"; 391 391 … … 460 460 // return a timet in the localtime, or UTC 461 461 $t=0; 462 if ( ereg("([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})",$idate, $regs))462 if (preg_match('/([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})/',$idate, $regs)) 463 463 { 464 464 if ($utc) … … 590 590 $methName = $m->getParam(0); 591 591 $methName = $methName->scalarval(); 592 if ( ereg("^system\.", $methName))592 if (preg_match('/^system\./', $methName)) 593 593 { 594 594 $dmap = $GLOBALS['_xmlrpcs_dmap']; … … 637 637 $methName = $m->getParam(0); 638 638 $methName = $methName->scalarval(); 639 if ( ereg("^system\.", $methName))639 if (preg_match('/^system\./', $methName)) 640 640 { 641 641 $dmap = $GLOBALS['_xmlrpcs_dmap']; -
trunk/phpgwapi/templates/classic/login_classic.php
r3243 r5912 294 294 foreach($_GET as $name => $value) 295 295 { 296 if( ereg('phpgw_',$name))296 if(preg_match('/phpgw_/',$name)) 297 297 { 298 298 $extra_vars .= '&' . $name . '=' . urlencode($value);
Note: See TracChangeset
for help on using the changeset viewer.