From c7719284833f211984474623832b96707173e02d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 15 Oct 2012 14:12:22 +0300 Subject: Remove CI_Email::_get_ip() --- system/libraries/Email.php | 41 ------------------------------------- user_guide_src/source/changelog.rst | 1 + 2 files changed, 1 insertion(+), 41 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index fa1d5e9bf..08057f2f7 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1753,47 +1753,6 @@ class CI_Email { // -------------------------------------------------------------------- - /** - * Get IP - * - * @return string - */ - protected function _get_ip() - { - if ($this->_IP !== FALSE) - { - return $this->_IP; - } - - $cip = ( ! empty($_SERVER['HTTP_CLIENT_IP'])) ? $_SERVER['HTTP_CLIENT_IP'] : FALSE; - $rip = ( ! empty($_SERVER['REMOTE_ADDR'])) ? $_SERVER['REMOTE_ADDR'] : FALSE; - if ($cip) $this->_IP = $cip; - elseif ($rip) $this->_IP = $rip; - else - { - $fip = ( ! empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : FALSE; - if ($fip) - { - $this->_IP = $fip; - } - } - - if (strpos($this->_IP, ',') !== FALSE) - { - $x = explode(',', $this->_IP); - $this->_IP = end($x); - } - - if ( ! preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $this->_IP)) - { - $this->_IP = '0.0.0.0'; - } - - return $this->_IP; - } - - // -------------------------------------------------------------------- - /** * Get Debug Message * diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index cc7cbacf7..f31781d5c 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -203,6 +203,7 @@ Release Date: Not Released - Removed the second parameter (character limit) from internal method ``_prep_quoted_printable()`` as it is never used. - Internal method ``_prep_quoted_printable()`` will now utilize the native ``quoted_printable_encode()``, ``imap_8bit()`` functions (if available) when CRLF is set to "\r\n". - Default charset now relies on the global ``$config['charset']`` setting. + - Removed unused protected method ``_get_ip()`` (:doc:`Input Library `'s ``ip_address()`` should be used anyway). - :doc:`Pagination Library ` changes include: - Added support for the anchor "rel" attribute. - Added support for setting custom attributes. -- cgit v1.2.3-24-g4f1b