mirror of
https://github.com/e107inc/e107.git
synced 2025-08-14 02:24:08 +02:00
PHP 5.3+(and NOT 3+ as stated in the previous commit :) ) overall system compatibility
This commit is contained in:
@@ -97,7 +97,7 @@ class email_validation_class
|
||||
$this->preg=(function_exists("preg_match") ? "/".str_replace("/", "\\/", $this->email_regular_expression)."/" : "");
|
||||
return($this->ValidateEmailAddress($email));
|
||||
}
|
||||
return(eregi($this->email_regular_expression,$email)!=0);
|
||||
return(preg_match("/".str_replace("/", "\\/", $this->email_regular_expression)."/i", $email)/*!=0*/);
|
||||
}
|
||||
|
||||
Function ValidateEmailHost($email,&$hosts)
|
||||
@@ -156,7 +156,7 @@ class email_validation_class
|
||||
for($host=0;$host<count($hosts);$host++)
|
||||
{
|
||||
$domain=$hosts[$host];
|
||||
if(ereg('^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$',$domain))
|
||||
if(preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/',$domain))
|
||||
$ip=$domain;
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user