Revision: 2988
https://sourceforge.net/p/mrbs/code/2988/
Author: cimorrison
Date: 2015-01-28 15:50:06 +0000 (Wed, 28 Jan 2015)
Log Message:
-----------
Fixed "undefined method isValidInetAddress()" message when saving the edit_area
form and using a Turkish locale [caused by the capital 'I' in the method name]
Modified Paths:
--------------
mrbs/trunk/web/functions.inc
Modified: mrbs/trunk/web/functions.inc
===================================================================
--- mrbs/trunk/web/functions.inc 2015-01-28 13:24:21 UTC (rev 2987)
+++ mrbs/trunk/web/functions.inc 2015-01-28 15:50:06 UTC (rev 2988)
@@ -2006,20 +2006,20 @@
// returns FALSE if any one of them is invalid, otherwise TRUE
function validate_email_list($list)
{
- require_once 'Mail/RFC822.php';
- (!isset($list)) ? $list = '': '';
+ if (!isset($list) || ($list === ''))
+ {
+ return TRUE;
+ }
+
$emails = explode(',', $list);
- $email_validator = new Mail_RFC822();
foreach ($emails as $email)
{
- // if no email address is entered, this is OK, even if isValidInetAddress
- // does not return TRUE
- if ( !$email_validator->isValidInetAddress($email, $strict = FALSE)
- && ('' != $list) )
+ if (FALSE === filter_var(trim($email), FILTER_VALIDATE_EMAIL))
{
return FALSE;
}
}
+
return TRUE;
}
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits