[Fusionforge-commits] r10777 - in trunk/src/common: frs include

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Fri Oct 1 20:22:50 CEST 2010


Author: aljeux
Date: 2010-10-01 20:22:50 +0200 (Fri, 01 Oct 2010)
New Revision: 10777

Modified:
   trunk/src/common/frs/FRSPackage.class.php
   trunk/src/common/frs/FRSRelease.class.php
   trunk/src/common/include/utils.php
Log:
ereg => preg migration.

Modified: trunk/src/common/frs/FRSPackage.class.php
===================================================================
--- trunk/src/common/frs/FRSPackage.class.php	2010-10-01 18:22:43 UTC (rev 10776)
+++ trunk/src/common/frs/FRSPackage.class.php	2010-10-01 18:22:50 UTC (rev 10777)
@@ -240,7 +240,7 @@
 	 *  @return string  The name of this package.
 	 */
 	function getFileName() {
-		return eregi_replace("[^-A-Z0-9_\.]",'',$this->data_array['name']);
+		return preg_replace("/[^-A-Z0-9_\.]/i",'',$this->data_array['name']);
 	}
 
 	/**

Modified: trunk/src/common/frs/FRSRelease.class.php
===================================================================
--- trunk/src/common/frs/FRSRelease.class.php	2010-10-01 18:22:43 UTC (rev 10776)
+++ trunk/src/common/frs/FRSRelease.class.php	2010-10-01 18:22:50 UTC (rev 10777)
@@ -226,7 +226,7 @@
 	 *  @return string  The filename of this release.
 	 */
 	function getFileName() {
-		return eregi_replace("[^-A-Z0-9_\.]",'',$this->data_array['name']);
+		return preg_replace("/[^-A-Z0-9_\.]/i",'',$this->data_array['name']);
 	}
 
 	/**

Modified: trunk/src/common/include/utils.php
===================================================================
--- trunk/src/common/include/utils.php	2010-10-01 18:22:43 UTC (rev 10776)
+++ trunk/src/common/include/utils.php	2010-10-01 18:22:50 UTC (rev 10777)
@@ -847,7 +847,7 @@
  */
 function util_is_valid_filename ($file) {
 	//bad char test
-	$invalidchars = eregi_replace("[-A-Z0-9+_\. ~]","",$file);
+	$invalidchars = preg_replace("/[-A-Z0-9+_\. ~]/i","",$file);
 
 	if (!empty($invalidchars)) {
 		return false;




More information about the Fusionforge-commits mailing list