[Fusionforge-commits] r10843 - trunk/src/common/include

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Mon Oct 4 19:17:26 CEST 2010


Author: nerville
Date: 2010-10-04 19:17:26 +0200 (Mon, 04 Oct 2010)
New Revision: 10843

Modified:
   trunk/src/common/include/utils.php
Log:
make unit test ok

Modified: trunk/src/common/include/utils.php
===================================================================
--- trunk/src/common/include/utils.php	2010-10-04 17:00:41 UTC (rev 10842)
+++ trunk/src/common/include/utils.php	2010-10-04 17:17:26 UTC (rev 10843)
@@ -816,9 +816,11 @@
  *
  */
 function validate_email ($address) {
-	return ( preg_match(
-		"/^[-!#$%&\'*+\\.\/0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\.\/0-9=?A-Z^_`a-z{|}~]+$/",
-		$address) );
+	if ( preg_match( "/^[-!#$%&\'*+\\.\/0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\.\/0-9=?A-Z^_`a-z{|}~]+$/", $address) ) {
+		return true;
+	} else {
+		return false;
+	}
 }
 
 /**




More information about the Fusionforge-commits mailing list