aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_convert.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-02-25 13:21:59 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-02-25 13:21:59 +0000
commit23577db488d2706e4ffab4be1592b528086d692c (patch)
treeec2c478094c82ed0747150ade7e90f46f88d76d0 /phpBB/includes/functions_convert.php
parent651737db767d96965bfe21d86af1b4810149e94a (diff)
downloadforums-23577db488d2706e4ffab4be1592b528086d692c.tar
forums-23577db488d2706e4ffab4be1592b528086d692c.tar.gz
forums-23577db488d2706e4ffab4be1592b528086d692c.tar.bz2
forums-23577db488d2706e4ffab4be1592b528086d692c.tar.xz
forums-23577db488d2706e4ffab4be1592b528086d692c.zip
this hopefully solves the issue of wrongly converted ips completely. Sometimes there is really no ip...
git-svn-id: file:///svn/phpbb/trunk@7063 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_convert.php')
-rw-r--r--phpBB/includes/functions_convert.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index 0884ef01e8..87fe1c2649 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -304,15 +304,15 @@ function decode_ip($int_ip)
{
if (!$int_ip)
{
- return '127.0.0.1';
+ return $int_ip;
}
$hexipbang = explode('.', chunk_split($int_ip, 2, '.'));
- // Any mod changing the way ips are stored? Then we are not able to convert...
+ // Any mod changing the way ips are stored? Then we are not able to convert and enter the ip "as is" to not "destroy" anything...
if (sizeof($hexipbang) < 4)
{
- return '127.0.0.1';
+ return $int_ip;
}
return hexdec($hexipbang[0]) . '.' . hexdec($hexipbang[1]) . '.' . hexdec($hexipbang[2]) . '.' . hexdec($hexipbang[3]);