Changeset 5928
- Timestamp:
- 04/12/12 11:15:33 (12 years ago)
- Location:
- trunk
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/inc/class.uiaccounts.inc.php
r2 r5928 74 74 { 75 75 // 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'])) 77 77 $GLOBALS['query'] = $_POST['query']; 78 78 } … … 242 242 { 243 243 // 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'])) 245 245 $GLOBALS['query'] = $_REQUEST['query']; 246 246 } -
trunk/contactcenter/inc/class.ui_data.inc.php
r5288 r5928 4747 4747 $return['_existing']++; 4748 4748 } 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) { 4750 4750 $return['_failure']++; 4751 4751 $return['_failure_status'] .= "Line: " . ($line_iteration + 2) . ", Invalid E-Mail address: " . $email ."<br>"; -
trunk/expressoMail1_2/inc/show_user_photo.php
r5509 r5928 23 23 $mail = $_GET['mail']; 24 24 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)) 26 26 exit; 27 27 -
trunk/listAdmin/inc/class.uimaillists.inc.php
r3514 r5928 55 55 { 56 56 // 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'])) 58 58 $GLOBALS['query'] = $_POST['query']; 59 59 } -
trunk/mobile/inc/class.ui_mobilecc.inc.php
r5043 r5928 913 913 $pattern = "^[a-z0-9_\.\-]+@[a-z0-9_\.\-]*[a-z0-9_\-]+\.[a-z]{2,4}$"; 914 914 915 if (! eregi($pattern, $data['email'])){915 if (!preg_match("/$pattern/i", $data['email'])){ 916 916 $valid = lang('invalid field e-mail'); 917 917 } -
trunk/phpgwapi/inc/class.clientsniffer.inc.php
r5912 r5928 76 76 77 77 // 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) ) 80 80 { 81 81 $this->VERSION = $info[1]; 82 82 $this->NAME = 'IE'; 83 83 } 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) ) 86 86 { 87 87 $this->VERSION = $info[1]; 88 88 $this->NAME = 'Opera'; 89 89 } 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) ) 92 92 { 93 93 $this->VERSION = $info[1]; 94 94 $this->NAME = 'iCab'; 95 95 } 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) ) 97 97 { 98 98 $this->VERSION = $info[1]; 99 99 $this->NAME = 'Netscape'; 100 100 } 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) ) 102 102 { 103 103 $this->VERSION = $info[1]; … … 111 111 112 112 // Determine if AOL or WEBTV 113 if( eregi( 'aol',$this->UA,$info))113 if( preg_match( '/aol/i',$this->UA,$info)) 114 114 { 115 115 $this->AOL = true; 116 116 } 117 elseif( eregi( 'webtv',$this->UA,$info))117 elseif( preg_match( '/webtv/i',$this->UA,$info)) 118 118 { 119 119 $this->WEBTV = true; … … 138 138 139 139 // 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)) 144 144 { 145 145 $this->PLATFORM = 'Win16'; … … 148 148 149 149 // 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)) 151 151 { 152 152 $this->PLATFORM = 'Win32'; 153 153 $this->OS = 'Win95'; 154 154 } 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)) 156 156 { 157 157 $this->PLATFORM = 'Win32'; 158 158 $this->OS = 'Win98'; 159 159 } 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)) 161 161 { 162 162 $this->PLATFORM = 'Win32'; … … 170 170 171 171 // 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)) 173 173 { 174 174 $this->PLATFORM = 'OS2'; … … 177 177 178 178 // 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)) 180 180 { 181 181 $this->PLATFORM = 'Mac'; … … 184 184 185 185 //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)) 187 187 { 188 188 $this->PLATFORM = 'Mac'; … … 193 193 194 194 //SunOS 195 if( eregi('sunos',$this->UA))195 if(preg_match('/sunos/i',$this->UA)) 196 196 { 197 197 $this->PLATFORM = 'Unix'; 198 198 $this->OS = 'sun'; 199 199 } 200 if( eregi('sunos 4',$this->UA))200 if(preg_match('/sunos 4/i',$this->UA)) 201 201 { 202 202 $this->PLATFORM = 'Unix'; 203 203 $this->OS = 'sun4'; 204 204 } 205 elseif( eregi('sunos 5',$this->UA))205 elseif(preg_match('/sunos 5/i',$this->UA)) 206 206 { 207 207 $this->PLATFORM = 'Unix'; 208 208 $this->OS = 'sun5'; 209 209 } 210 elseif( eregi('i86',$this->UA))210 elseif(preg_match('/i86/i',$this->UA)) 211 211 { 212 212 $this->PLATFORM = 'Unix'; … … 215 215 216 216 // Irix 217 if( eregi('irix',$this->UA))217 if(preg_match('/irix/',$this->UA)) 218 218 { 219 219 $this->PLATFORM = 'Unix'; 220 220 $this->OS = 'irix'; 221 221 } 222 if( eregi('irix 6',$this->UA))222 if(preg_match('/irix 6/i',$this->UA)) 223 223 { 224 224 $this->PLATFORM = 'Unix'; 225 225 $this->OS = 'irix6'; 226 226 } 227 elseif( eregi('irix 5',$this->UA))227 elseif(preg_match('/irix 5/i',$this->UA)) 228 228 { 229 229 $this->PLATFORM = 'Unix'; … … 232 232 233 233 //HP-UX 234 if( eregi('hp-ux',$this->UA))234 if(preg_match('/hp-ux/i',$this->UA)) 235 235 { 236 236 $this->PLATFORM = 'Unix'; 237 237 $this->OS = 'hpux'; 238 238 } 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)) 240 240 { 241 241 $this->PLATFORM = 'Unix'; 242 242 $this->OS = 'hpux10'; 243 243 } 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)) 245 245 { 246 246 $this->PLATFORM = 'Unix'; … … 249 249 250 250 //AIX 251 if( eregi('aix',$this->UA))251 if(preg_match('/aix/i',$this->UA)) 252 252 { 253 253 $this->PLATFORM = 'Unix'; 254 254 $this->OS = 'aix'; 255 255 } 256 if( eregi('aix1',$this->UA))256 if(preg_match('/aix1/i',$this->UA)) 257 257 { 258 258 $this->PLATFORM = 'Unix'; 259 259 $this->OS = 'aix1'; 260 260 } 261 elseif( eregi('aix2',$this->UA))261 elseif(preg_match('/aix2/i',$this->UA)) 262 262 { 263 263 $this->PLATFORM = 'Unix'; 264 264 $this->OS = 'aix2'; 265 265 } 266 elseif( eregi('aix3',$this->UA))266 elseif(preg_match('/aix3/i',$this->UA)) 267 267 { 268 268 $this->PLATFORM = 'Unix'; 269 269 $this->OS = 'aix3'; 270 270 } 271 elseif( eregi('aix4',$this->UA))271 elseif(preg_match('/aix4/i',$this->UA)) 272 272 { 273 273 $this->PLATFORM = 'Unix'; … … 276 276 277 277 // Linux 278 if( eregi('inux',$this->UA))278 if(preg_match('/inux/i',$this->UA)) 279 279 { 280 280 $this->PLATFORM = 'Unix'; … … 283 283 284 284 //Unixware 285 if( eregi('unix_system_v',$this->UA))285 if(preg_match('/unix_system_v/i',$this->UA)) 286 286 { 287 287 $this->PLATFORM = 'Unix'; … … 290 290 291 291 //mpras 292 if( eregi('ncr',$this->UA))292 if(preg_match('/ncr/i',$this->UA)) 293 293 { 294 294 $this->PLATFORM = 'Unix'; … … 297 297 298 298 //Reliant 299 if( eregi('reliantunix',$this->UA))299 if(preg_match('/reliantunix/i',$this->UA)) 300 300 { 301 301 $this->PLATFORM = 'Unix'; … … 304 304 305 305 // 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)) 311 311 { 312 312 $this->PLATFORM = 'Unix'; … … 315 315 316 316 // Sinix 317 if( eregi('sinix',$this->UA))317 if(preg_match('/sinix/i',$this->UA)) 318 318 { 319 319 $this->PLATFORM = 'Unix'; … … 322 322 323 323 // FreeBSD 324 if( eregi('freebsd',$this->UA))324 if(preg_match('/freebsd/i',$this->UA)) 325 325 { 326 326 $this->PLATFORM = 'Unix'; … … 329 329 330 330 // BSD 331 if( eregi('bsd',$this->UA))331 if(preg_match('/bsd/i',$this->UA)) 332 332 { 333 333 $this->PLATFORM = 'Unix'; … … 336 336 337 337 // 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)) 339 339 { 340 340 $this->PLATFORM = 'Unix'; … … 343 343 344 344 // 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)) 346 346 { 347 347 $this->PLATFORM = 'Unix'; … … 352 352 353 353 // 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); 366 366 367 367 // do the assumption -
trunk/phpgwapi/inc/class.common.inc.php
r5912 r5928 713 713 while ($file = readdir($dh)) 714 714 { 715 if ( eregi("\.css$", $file) && $file != 'phpgw.css')715 if (preg_match('/\.css$/i', $file) && $file != 'phpgw.css') 716 716 { 717 717 $list[] = substr($file,0,strpos($file,'.')); … … 724 724 while ($file = readdir($dh)) 725 725 { 726 if ( eregi("\.theme$", $file))726 if (preg_match('/\.theme$/i', $file)) 727 727 { 728 728 $list[] = substr($file,0,strpos($file,'.')); -
trunk/phpgwapi/inc/class.setup_html.inc.php
r3540 r5928 316 316 while ($file = $dh->read()) 317 317 { 318 if ( eregi("\.theme$", $file))318 if (preg_match('/\.theme$/i', $file)) 319 319 { 320 320 $list[] = substr($file,0,strpos($file,'.')); -
trunk/phpgwapi/inc/class.soapclient.inc.php
r5509 r5928 144 144 { 145 145 // fault? 146 if( eregi('fault',$return->name))146 if(preg_match('/fault/i',$return->name)) 147 147 { 148 148 $this->debug('got fault'); -
trunk/phpgwapi/inc/class.validator.inc.php
r5913 r5928 144 144 { 145 145 //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']) ) 147 147 { 148 148 //echo ' is name<br>'; … … 197 197 { 198 198 //echo "Checking $seg<br>"; 199 if( eregi("[a-z0-9\-]{0,62}",$seg))199 if(preg_match('/[a-z0-9\-]{0,62}/i',$seg)) 200 200 { 201 201 $return = True; -
trunk/phpgwapi/inc/class.xml.inc.php
r5915 r5928 1140 1140 } 1141 1141 } 1142 elseif ( eregi("^@", $step) )1142 elseif ( preg_match('/^@/i', $step) ) 1143 1143 { 1144 1144 // Use the attribute axis and select the attribute. … … 1146 1146 $axis["node-test"] = substr($step, 1); 1147 1147 } 1148 elseif ( eregi("\]$", $step) )1148 elseif ( preg_match('/\]$/i', $step) ) 1149 1149 { 1150 1150 // Use the child axis and select a position. … … 3086 3086 { 3087 3087 // 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] 3089 3089 ["attributes"]["xml:lang"]) ) 3090 3090 { … … 3106 3106 { 3107 3107 // 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"] 3109 3109 ["xml:lang"]) ) 3110 3110 { -
trunk/phpgwapi/inc/common_functions.inc.php
r3486 r5928 339 339 break; 340 340 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)) 342 342 { 343 343 $octets = split('\.',$string); … … 360 360 break; 361 361 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)) 363 363 { 364 364 return True; -
trunk/phpgwapi/inc/fpdf/font/makefont/makefont.php
r2 r5928 168 168 if(isset($fm['StdVW'])) 169 169 $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'])) 171 171 $stemv=120; 172 172 else -
trunk/preferences/templates/default/changepassword_default.php
r5921 r5928 42 42 { 43 43 $letter = $n_passwd[$i]; 44 if (!preg_match( "/[a-zA-Z]/", $letter ) )44 if (!preg_match('/[a-zA-Z]/', $letter ) ) 45 45 $speccial_letter++; 46 46 } -
trunk/services/class.ldap.php
r5405 r5928 187 187 188 188 function phoneticFilter($search, $params) { 189 if ( eregi("\d", $search))189 if (preg_match('/\d/i', $search)) 190 190 return( "" ); 191 191 -
trunk/workflow/inc/class.BrowserInfo.inc.php
r5921 r5928 71 71 72 72 // find operating system 73 if ( eregi("win", $agent))73 if (preg_match('/win/i', $agent)) 74 74 $bd['platform'] = "Windows"; 75 elseif ( eregi("mac", $agent))75 elseif (preg_match('/mac/i', $agent)) 76 76 $bd['platform'] = "MacIntosh"; 77 elseif ( eregi("linux", $agent))77 elseif (preg_match('/linux/i', $agent)) 78 78 $bd['platform'] = "Linux"; 79 elseif ( eregi("OS/2", $agent))79 elseif (preg_match('/OS\/2/i', $agent)) 80 80 $bd['platform'] = "OS/2"; 81 elseif ( eregi("BeOS", $agent))81 elseif (preg_match('/BeOS/i', $agent)) 82 82 $bd['platform'] = "BeOS"; 83 83 84 84 // test for Opera 85 if ( eregi("opera",$agent))85 if (preg_match('/opera/i',$agent)) 86 86 { 87 87 $val = stristr($agent, "opera"); 88 if ( eregi("/", $val))88 if (preg_match('/\//i', $val)) 89 89 { 90 90 $val = explode("/",$val); … … 102 102 // test for WebTV 103 103 } 104 elseif ( eregi("webtv",$agent))104 elseif (preg_match('/webtv/i',$agent)) 105 105 { 106 106 $val = explode("/",stristr($agent,"webtv")); … … 110 110 // test for MS Internet Explorer version 1 111 111 } 112 elseif ( eregi("microsoft internet explorer", $agent))112 elseif (preg_match('/microsoft internet explorer/i', $agent)) 113 113 { 114 114 $bd['browser'] = "MSIE"; … … 120 120 // test for NetPositive 121 121 } 122 elseif ( eregi("NetPositive", $agent))122 elseif (preg_match('/NetPositive/i', $agent)) 123 123 { 124 124 $val = explode("/",stristr($agent,"NetPositive")); … … 129 129 // test for MS Internet Explorer 130 130 } 131 elseif ( eregi("msie",$agent) && !eregi("opera",$agent))131 elseif (preg_match('/msie/i',$agent) && !preg_match('/opera/i',$agent)) 132 132 { 133 133 $val = explode(" ",stristr($agent,"msie")); … … 137 137 // test for MS Pocket Internet Explorer 138 138 } 139 elseif ( eregi("mspie",$agent) || eregi('pocket', $agent))139 elseif (preg_match('/mspie/i',$agent) || preg_match('/pocket/i', $agent)) 140 140 { 141 141 $val = explode(" ",stristr($agent,"mspie")); 142 142 $bd['browser'] = "MSPIE"; 143 143 $bd['platform'] = "WindowsCE"; 144 if ( eregi("mspie", $agent))144 if (preg_match('/mspie/i', $agent)) 145 145 $bd['version'] = $val[1]; 146 146 else … … 152 152 // test for Galeon 153 153 } 154 elseif ( eregi("galeon",$agent))154 elseif (preg_match('/galeon/i',$agent)) 155 155 { 156 156 $val = explode(" ",stristr($agent,"galeon")); … … 161 161 // test for Konqueror 162 162 } 163 elseif ( eregi("Konqueror",$agent))163 elseif (preg_match('/Konqueror/i',$agent)) 164 164 { 165 165 $val = explode(" ",stristr($agent,"Konqueror")); … … 170 170 // test for iCab 171 171 } 172 elseif ( eregi("icab",$agent))172 elseif (preg_match('/icab/i',$agent)) 173 173 { 174 174 $val = explode(" ",stristr($agent,"icab")); … … 178 178 // test for OmniWeb 179 179 } 180 elseif ( eregi("omniweb",$agent))180 elseif (preg_match('/omniweb/i',$agent)) 181 181 { 182 182 $val = explode("/",stristr($agent,"omniweb")); … … 186 186 // test for Phoenix 187 187 } 188 elseif ( eregi("Phoenix", $agent))188 elseif (preg_match('/Phoenix/i', $agent)) 189 189 { 190 190 $bd['browser'] = "Phoenix"; … … 194 194 // test for Firebird 195 195 } 196 elseif ( eregi("firebird", $agent))196 elseif (preg_match('/firebird/i', $agent)) 197 197 { 198 198 $bd['browser']="Firebird"; … … 203 203 // test for Firefox 204 204 } 205 elseif ( eregi("Firefox", $agent))205 elseif (preg_match('/Firefox/i', $agent)) 206 206 { 207 207 $bd['browser']="Firefox"; … … 212 212 // test for Mozilla Alpha/Beta Versions 213 213 } 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)) 215 215 { 216 216 $bd['browser'] = "Mozilla"; 217 217 $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); 219 219 $bd['version'] = str_replace("rv:","",$val[0]); 220 220 221 221 // test for Mozilla Stable Versions 222 222 } 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)) 224 224 { 225 225 $bd['browser'] = "Mozilla"; 226 226 $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); 228 228 $bd['version'] = str_replace("rv:","",$val[0]); 229 229 230 230 // test for Lynx & Amaya 231 231 } 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)) 235 235 { 236 236 $val = explode("/",stristr($agent,"amaya")); … … 248 248 // test for Safari 249 249 } 250 elseif ( eregi("safari", $agent))250 elseif (preg_match('/safari/i', $agent)) 251 251 { 252 252 $bd['browser'] = "Safari"; … … 255 255 // remaining two tests are for Netscape 256 256 } 257 elseif ( eregi("netscape",$agent))257 elseif (preg_match('/netscape/i',$agent)) 258 258 { 259 259 $val = explode(" ",stristr($agent,"netscape")); … … 262 262 $bd['version'] = $val[1]; 263 263 } 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)) 265 265 { 266 266 $val = explode(" ",stristr($agent,"mozilla")); … … 276 276 277 277 // check for AOL 278 if ( eregi("AOL", $agent))278 if (preg_match('/AOL/i', $agent)) 279 279 { 280 280 $var = stristr($agent, "AOL"); -
trunk/workflow/inc/class.bo_utils.inc.php
r5122 r5928 74 74 75 75 // 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)){ 77 77 if (strlen($cn) < 3) 78 78 { -
trunk/workflow/inc/class.utils.security.php
r795 r5928 142 142 list($attrSubSet[0]) = explode(' ', $attrSubSet[0]); 143 143 // 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')))) 145 145 continue; 146 146 // xss attr value filtering -
trunk/workflow/inc/fpdf/font/makefont/makefont.php
r795 r5928 172 172 if(isset($fm['StdVW'])) 173 173 $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'])) 175 175 $stemv=120; 176 176 else -
trunk/workflow/inc/local/classes/class.wf_instance.php
r4921 r5928 388 388 foreach ($users as &$user) 389 389 { 390 if (! eregi('^[p]{0,1}[0-9]+$', "$user"))390 if (!preg_match('/^[p]{0,1}[0-9]+$/i', "$user")) 391 391 trigger_error('wf_engine::getUserInstances: O usuário/perfil "' . $user . '" é inválido', E_USER_ERROR); 392 392 $user = "'{$user}'"; -
trunk/workflow/inc/local/classes/class.wf_regex.php
r5921 r5928 525 525 return( preg_match("/$pattern/", (string) $input ) ); 526 526 else 527 return( eregi( $pattern, (string) $input ) );527 return( preg_match("/$pattern/i", (string) $input ) ); 528 528 } 529 529 -
trunk/workflow/inc/phplot/phplot.php
r795 r5928 1313 1313 $asked = trim($which_opt); 1314 1314 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. 1316 1316 if ($asked == '') 1317 1317 return ''; 1318 1318 1319 1319 $asked = strtolower($asked); 1320 if (@ eregi($asked, $which_acc)) {1320 if (@ preg_match("/$asked/i", $which_acc)) { 1321 1321 return $asked; 1322 1322 } else {
Note: See TracChangeset
for help on using the changeset viewer.