[Fusionforge-commits] r10117 - in trunk/src: common/include www/include

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Thu Jun 24 21:54:28 CEST 2010


Author: aljeux
Date: 2010-06-24 21:54:28 +0200 (Thu, 24 Jun 2010)
New Revision: 10117

Modified:
   trunk/src/common/include/utils.php
   trunk/src/www/include/browser.php
Log:
ereg => preg migration.

Modified: trunk/src/common/include/utils.php
===================================================================
--- trunk/src/common/include/utils.php	2010-06-24 19:54:20 UTC (rev 10116)
+++ trunk/src/common/include/utils.php	2010-06-24 19:54:28 UTC (rev 10117)
@@ -1037,7 +1037,7 @@
  * @return string URI
  */
 function util_make_uri ($path) {
-	$path = ereg_replace ("^/", "", $path) ;
+	$path = preg_replace ('/^\//', '', $path) ;
 	$uri = normalized_urlprefix () ;
 	$uri .= $path ;
 	return $uri ;

Modified: trunk/src/www/include/browser.php
===================================================================
--- trunk/src/www/include/browser.php	2010-06-24 19:54:20 UTC (rev 10116)
+++ trunk/src/www/include/browser.php	2010-06-24 19:54:28 UTC (rev 10117)
@@ -61,13 +61,13 @@
 */
 
 
-if (ereg( 'MSIE ([0-9].[0-9]{1,2})',getStringFromServer('HTTP_USER_AGENT'),$log_version)) {
+if (preg_match('/MSIE ([0-9].[0-9]{1,2})/',getStringFromServer('HTTP_USER_AGENT'),$log_version)) {
 	$GLOBALS['BROWSER_VER']=$log_version[1];
 	$GLOBALS['BROWSER_AGENT']='IE';
-} elseif (ereg( 'Opera ([0-9].[0-9]{1,2})',getStringFromServer('HTTP_USER_AGENT'),$log_version)) {
+} elseif (preg_match('/Opera ([0-9].[0-9]{1,2})/',getStringFromServer('HTTP_USER_AGENT'),$log_version)) {
 	$GLOBALS['BROWSER_VER']=$log_version[1];
 	$GLOBALS['BROWSER_AGENT']='OPERA';
-} elseif (ereg( 'Mozilla/([0-9].[0-9]{1,2})',getStringFromServer('HTTP_USER_AGENT'),$log_version)) {
+} elseif (preg_match('/Mozilla\/([0-9].[0-9]{1,2})/',getStringFromServer('HTTP_USER_AGENT'),$log_version)) {
 	$GLOBALS['BROWSER_VER']=$log_version[1];
 	$GLOBALS['BROWSER_AGENT']='MOZILLA';
 } else {




More information about the Fusionforge-commits mailing list