summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-08-21 23:37:25 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-08-21 23:37:25 +0200
commit38e4a7765642f8945bf1c7668eb35e3a9de8cbb8 (patch)
treef2ec3ef342d467a768730b8ffa35f28a0f3f1e03 /system
parent1e4276da338741e63de4701e5cdba611953fe024 (diff)
parent16f27b402049dc2ff0cc09faf4885aee944ba639 (diff)
Merge branch 'issue227' of https://github.com/johnbellone/CodeIgniter into develop
Diffstat (limited to 'system')
-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'))
{