]> git.joonet.de Git - adminer.git/commitdiff
Allow multiple e-mails
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Wed, 21 Apr 2010 22:21:47 +0000 (22:21 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Wed, 21 Apr 2010 22:21:47 +0000 (22:21 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1469 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/include/functions.inc.php

index 0118cfe405cf24e6280ef18897d6af0e7e6c15d1..3dd0fc9a6099b6be1cb316efedb7e83e52963dc0 100644 (file)
@@ -616,7 +616,8 @@ function apply_sql_function($function, $column) {
 function is_email($email) {
        $atom = '[-a-z0-9!#$%&\'*+/=?^_`{|}~]'; // characters of local-name
        $domain = '[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])'; // one domain component
-       return preg_match("(^$atom+(\\.$atom+)*@($domain?\\.)+$domain\$)i", $email);
+       $pattern = "$atom+(\\.$atom+)*@($domain?\\.)+$domain";
+       return preg_match("(^$pattern(,\\s*$pattern)*\$)i", $email);
 }
 
 /** Check whether the string is URL address