Update messages
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2551 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -22,7 +22,7 @@ class ipaddresses
|
|||||||
public function validIPv4Address ($ip)
|
public function validIPv4Address ($ip)
|
||||||
{
|
{
|
||||||
if (!is_string ($ip) || $ip === "")
|
if (!is_string ($ip) || $ip === "")
|
||||||
throw new \Exception (dgettext("domframework", "Invalid IP address"), 500);
|
throw new \Exception (dgettext("domframework", "Invalid IPv4 address"), 500);
|
||||||
$rc = filter_var ($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
|
$rc = filter_var ($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
|
||||||
if ($rc ===FALSE)
|
if ($rc ===FALSE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -33,7 +33,7 @@ class ipaddresses
|
|||||||
public function validIPv6Address ($ip)
|
public function validIPv6Address ($ip)
|
||||||
{
|
{
|
||||||
if (!is_string ($ip) || $ip === "")
|
if (!is_string ($ip) || $ip === "")
|
||||||
throw new \Exception (dgettext("domframework", "Invalid IP address"), 500);
|
throw new \Exception (dgettext("domframework", "Invalid IPv6 address"), 500);
|
||||||
$rc = filter_var ($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6);
|
$rc = filter_var ($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6);
|
||||||
if ($rc ===FALSE)
|
if ($rc ===FALSE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|||||||
Reference in New Issue
Block a user