Input class: change behavior of get_post() method, add post_get() method
followup to PR #2522
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 4a45a71..ba104bb 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -388,6 +388,7 @@
- Changed method ``valid_ip()`` to use PHP's native ``filter_var()`` function.
- Changed internal method ``_sanitize_globals()`` to skip enforcing reversal of *register_globals* in PHP 5.4+, where this functionality no longer exists.
- Changed methods ``get()``, ``post()``, ``get_post()``, ``cookie()``, ``server()``, ``user_agent()`` to return NULL instead of FALSE when no value is found.
+ - Changed method ``get_post()`` to check in GET then in POST. Added method ``post_get()`` which checks in POST then in GET, as ``get_post()`` was doing before.
- Changed method ``_fetch_from_array()`` to parse array notation in field name.
- :doc:`Common functions <general/common_functions>` changes include:
diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst
index 8983558..21bdd18 100644
--- a/user_guide_src/source/installation/upgrade_300.rst
+++ b/user_guide_src/source/installation/upgrade_300.rst
@@ -181,15 +181,26 @@
- element()
- elements()
+********************************************************
+Step 11: Update usage of Input Class's get_post() method
+********************************************************
+
+Previously, the :doc:`Input Class <../libraries/input>` method ``get_post()``
+was checking first in POST data, then in GET data. This method has been modified
+so that it checks in GET then in POST, as its name suggests.
+
+A method has been added, ``post_get()``, which checks in POST then in GET, as
+``get_post()`` was doing before.
+
***********************************************************************
-Step 11: Check the calls to Directory Helper's directory_map() function
+Step 12: Update usage of Directory Helper's directory_map() function
***********************************************************************
In the resulting array, directories now end with a trailing directory
separator (i.e. a slash, usually).
*************************************************************
-Step 12: Update usage of Database Forge's drop_table() method
+Step 13: Update usage of Database Forge's drop_table() method
*************************************************************
Up until now, ``drop_table()`` added an IF EXISTS clause by default or it didn't work
@@ -211,7 +222,7 @@
all drivers with the exception of ODBC.
***********************************************************
-Step 13: Change usage of Email library with multiple emails
+Step 14: Change usage of Email library with multiple emails
***********************************************************
The :doc:`Email Library <../libraries/email>` will automatically clear the
@@ -226,7 +237,7 @@
}
***************************************************
-Step 14: Update your Form_validation language lines
+Step 15: Update your Form_validation language lines
***************************************************
Two improvements have been made to the :doc:`Form Validation Library
@@ -257,7 +268,7 @@
later.
****************************************************************
-Step 15: Remove usage of (previously) deprecated functionalities
+Step 16: Remove usage of (previously) deprecated functionalities
****************************************************************
In addition to the ``$autoload['core']`` configuration setting, there's a
diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst
index 177f5cb..fb245d7 100644
--- a/user_guide_src/source/libraries/input.rst
+++ b/user_guide_src/source/libraries/input.rst
@@ -98,7 +98,7 @@
$this->input->get()
===================
-This method is identical to the post method, only it fetches get data
+This method is identical to the POST method, only it fetches GET data
::
$this->input->get('some_data', TRUE);
@@ -116,18 +116,26 @@
$this->input->get(); // returns all GET items without XSS filtering
+$this->input->post_get()
+========================
+
+This method will search through both the POST and GET streams for
+data, looking first in POST, and then in GET::
+
+ $this->input->post_get('some_data', TRUE);
+
$this->input->get_post()
========================
-This method will search through both the post and get streams for
-data, looking first in post, and then in get::
+This method will search through both the POST and GET streams for
+data, looking first in GET, and then in POST::
$this->input->get_post('some_data', TRUE);
$this->input->cookie()
======================
-This method is identical to the post method, only it fetches cookie data
+This method is identical to the POST method, only it fetches cookie data
::
$this->input->cookie('some_cookie');