From d3ee04109528470666c016fcc05c69941de879b2 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Fri, 20 Jun 2008 05:39:18 +0000 Subject: Added get_post() to the Input class. Documented get() in the Input class. --- system/libraries/Input.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'system/libraries/Input.php') diff --git a/system/libraries/Input.php b/system/libraries/Input.php index 8c08468bd..0b05c54d6 100644 --- a/system/libraries/Input.php +++ b/system/libraries/Input.php @@ -273,6 +273,28 @@ class CI_Input { // -------------------------------------------------------------------- + /** + * Fetch an item from either the GET array or the POST + * + * @access public + * @param string The index key + * @param bool XSS cleaning + * @return string + */ + function get_post($index = '', $xss_clean = FALSE) + { + if ( ! isset($_POST[$index]) ) + { + return $this->get($index, $xss_clean); + } + else + { + return $this->post($index, $xss_clean); + } + } + + // -------------------------------------------------------------------- + /** * Fetch an item from the COOKIE array * -- cgit v1.2.3-24-g4f1b