diff options
author | Eric Barnes <eric@ericlbarnes.com> | 2011-08-29 05:59:15 +0200 |
---|---|---|
committer | Eric Barnes <eric@ericlbarnes.com> | 2011-08-29 05:59:15 +0200 |
commit | 65faf9fb927cd20bc0b98f0f33ae662a2611c6de (patch) | |
tree | ed0677704edeb364ed17080b8c993e894550c024 /system/core/Input.php | |
parent | 91249f1154c6cc078afbf23faa60b9f6414ab597 (diff) | |
parent | 4f17de94737f5eb9e1230f7d854dea611ebd9901 (diff) |
Merge branch 'develop' into feature/unit-tests
Diffstat (limited to 'system/core/Input.php')
-rwxr-xr-x | system/core/Input.php | 8 |
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')) { |