Skip to content

Commit

Permalink
Merge branch 'issue227' of https://github.com/johnbellone/CodeIgniter
Browse files Browse the repository at this point in the history
…into develop
  • Loading branch information
Phil Sturgeon committed Aug 21, 2011
2 parents 1e4276d + 16f27b4 commit 38e4a77
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions system/core/Input.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,13 @@ function ip_address()

$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'))
{
Expand Down

0 comments on commit 38e4a77

Please sign in to comment.