diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/core/Input.php | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/system/core/Input.php b/system/core/Input.php index 620e50f63..1408da2cb 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -47,13 +47,6 @@ class CI_Input { public $ip_address = FALSE; /** - * User agent string - * - * @var string - */ - public $user_agent = FALSE; - - /** * Allow GET array flag * * If set to FALSE, then $_GET will be set to an empty array. @@ -553,14 +546,9 @@ class CI_Input { * * @return string|null User Agent string or NULL if it doesn't exist */ - public function user_agent() + public function user_agent($xss_clean = NULL) { - if ($this->user_agent !== FALSE) - { - return $this->user_agent; - } - - return $this->user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : NULL; + return $this->_fetch_from_array($_SERVER, 'HTTP_USER_AGENT', $xss_clean); } // -------------------------------------------------------------------- |