Permalink
Browse files

Allow multiple e-mails

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1469 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
jakubvrana
jakubvrana committed Apr 21, 2010
1 parent 191e06b commit 28e1dd286a9ad7dbfc8d01a2fa47b77161d4db90
Showing with 2 additions and 1 deletion.
  1. +2 −1 adminer/include/functions.inc.php
@@ -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

0 comments on commit 28e1dd2

Please sign in to comment.