summaryrefslogtreecommitdiffstats
path: root/system/core/Input.php
diff options
context:
space:
mode:
authorEric Barnes <eric@ericlbarnes.com>2011-08-29 05:59:15 +0200
committerEric Barnes <eric@ericlbarnes.com>2011-08-29 05:59:15 +0200
commit65faf9fb927cd20bc0b98f0f33ae662a2611c6de (patch)
treeed0677704edeb364ed17080b8c993e894550c024 /system/core/Input.php
parent91249f1154c6cc078afbf23faa60b9f6414ab597 (diff)
parent4f17de94737f5eb9e1230f7d854dea611ebd9901 (diff)
Merge branch 'develop' into feature/unit-tests
Diffstat (limited to 'system/core/Input.php')
-rwxr-xr-xsystem/core/Input.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index 5a033e7b8..0dc2c4550 100755
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -323,13 +323,13 @@ class CI_Input {
$this->ip_address = in_array($_SERVER['REMOTE_ADDR'], $proxies) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
}
- elseif ($this->server('REMOTE_ADDR') AND $this->server('HTTP_CLIENT_IP'))
+ elseif (! $this->server('HTTP_CLIENT_IP') AND $this->server('REMOTE_ADDR'))
{
- $this->ip_address = $_SERVER['HTTP_CLIENT_IP'];
+ $this->ip_address = $_SERVER['REMOTE_ADDR'];
}
- elseif ($this->server('REMOTE_ADDR'))
+ elseif ($this->server('REMOTE_ADDR') AND $this->server('HTTP_CLIENT_IP'))
{
- $this->ip_address = $_SERVER['REMOTE_ADDR'];
+ $this->ip_address = $_SERVER['HTTP_CLIENT_IP'];
}
elseif ($this->server('HTTP_CLIENT_IP'))
{