summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source
diff options
context:
space:
mode:
authorvlakoff <vlakoff@gmail.com>2013-08-11 20:36:41 +0200
committervlakoff <vlakoff@gmail.com>2013-08-11 20:38:16 +0200
commit441fd264267ac526730d06183bd3cfebfd26df01 (patch)
treea0cfb34851bf03221583e7b535db82898c077dbd /user_guide_src/source
parente23ba1373b347ecca61c371c96f0e33da443e915 (diff)
Input class: change behavior of get_post() method, add post_get() method
followup to PR #2522
Diffstat (limited to 'user_guide_src/source')
-rw-r--r--user_guide_src/source/changelog.rst1
-rw-r--r--user_guide_src/source/installation/upgrade_300.rst21
-rw-r--r--user_guide_src/source/libraries/input.rst16
3 files changed, 29 insertions, 9 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 4a45a71b0..ba104bb72 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -388,6 +388,7 @@ Release Date: Not Released
- 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 89835585c..21bdd188f 100644
--- a/user_guide_src/source/installation/upgrade_300.rst
+++ b/user_guide_src/source/installation/upgrade_300.rst
@@ -181,15 +181,26 @@ Many methods and functions now return NULL instead of FALSE when the required it
- 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 @@ If your application relies on IF EXISTS, you'll have to change its usage.
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 @@ pass FALSE as the first parameter in the ``send()`` method:
}
***************************************************
-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 @@ files and error messages format:
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 177f5cb64..fb245d7cd 100644
--- a/user_guide_src/source/libraries/input.rst
+++ b/user_guide_src/source/libraries/input.rst
@@ -98,7 +98,7 @@ The method returns NULL if there are no items in the POST.
$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 @@ The method returns NULL if there are no items in the GET.
$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');