summaryrefslogtreecommitdiff
path: root/program/include/rcube_utils.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-08-27 12:23:30 +0200
committerAleksander Machniak <alec@alec.pl>2012-08-27 12:23:30 +0200
commita65ce5d3b07deb578cc4c4aba5695bcea8c07a87 (patch)
treea3b441a115e7081a326da104444fea707034522f /program/include/rcube_utils.php
parent6075f084ecbff71490fc5594f2d9470d87938317 (diff)
Rename ip_check to check_ip, add IP checking tests
Diffstat (limited to 'program/include/rcube_utils.php')
-rw-r--r--program/include/rcube_utils.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/include/rcube_utils.php b/program/include/rcube_utils.php
index defb2aed1..aa748dc7f 100644
--- a/program/include/rcube_utils.php
+++ b/program/include/rcube_utils.php
@@ -94,7 +94,7 @@ class rcube_utils
// Validate domain part
if (preg_match('/^\[((IPv6:[0-9a-f:.]+)|([0-9.]+))\]$/i', $domain_part, $matches)) {
- return self::ip_check(preg_replace('/^IPv6:/i', '', $matches[1])); // valid IPv4 or IPv6 address
+ return self::check_ip(preg_replace('/^IPv6:/i', '', $matches[1])); // valid IPv4 or IPv6 address
}
else {
// If not an IP address
@@ -154,7 +154,7 @@ class rcube_utils
*
* @return bool True if the address is valid
*/
- public static function ip_check($ip)
+ public static function check_ip($ip)
{
// IPv6, but there's no build-in IPv6 support
if (strpos($ip, ':') !== false && !defined('AF_INET6')) {