aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2010-08-03 11:07:40 +0200
committerAndreas Fischer <bantu@phpbb.com>2011-01-03 00:09:51 +0100
commit985151913c3a75d817db4746bc2dbf3a93e9b019 (patch)
tree2466f780c4739cdffe4f38d7ec7e8b0adef868ee /phpBB/includes/functions.php
parent2aa54bb1560303cc526f13d43b3df0d451acd9f1 (diff)
downloadforums-985151913c3a75d817db4746bc2dbf3a93e9b019.tar
forums-985151913c3a75d817db4746bc2dbf3a93e9b019.tar.gz
forums-985151913c3a75d817db4746bc2dbf3a93e9b019.tar.bz2
forums-985151913c3a75d817db4746bc2dbf3a93e9b019.tar.xz
forums-985151913c3a75d817db4746bc2dbf3a93e9b019.zip
[ticket/9746] Ease up phpbb_ip_normalise() function.
PHPBB3-9746
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php21
1 files changed, 1 insertions, 20 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index ac3641ae17..3048825064 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3310,27 +3310,8 @@ function phpbb_ip_normalise($address)
{
return $address;
}
- else if (preg_match(get_preg_expression('ipv6'), $address))
- {
- $address = phpbb_inet_ntop(phpbb_inet_pton($address));
-
- if (strpos($address, '::ffff:') === 0)
- {
- // IPv4-mapped address
- $address_ipv4 = substr($address, 7);
- if (preg_match(get_preg_expression('ipv4'), $address_ipv4))
- {
- return $address_ipv4;
- }
-
- return false;
- }
-
- return $address;
- }
-
- return false;
+ return phpbb_inet_ntop(phpbb_inet_pton($address));
}
/**