summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/core/Input.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index cb842812f..ea5b248cf 100644
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -111,6 +111,22 @@ class CI_Input {
*/
function get($index = '', $xss_clean = FALSE)
{
+ // check if a field has been entered
+ if( empty($index) AND is_array($_GET) AND count($_GET) )
+ {
+ // no field entered - return all fields
+
+ $all_get_fields = array();
+
+ // loop through the full _GET array
+ foreach( $_GET as $key )
+ {
+ $all_get_fields[$key] = $this->_fetch_from_array($_GET, $key, $xss_clean);
+ }
+ return $all_get_fields;
+
+ }
+
return $this->_fetch_from_array($_GET, $index, $xss_clean);
}
@@ -126,6 +142,22 @@ class CI_Input {
*/
function post($index = '', $xss_clean = FALSE)
{
+ // check if a field has been entered
+ if( empty($index) AND is_array($_POST) AND count($_POST) )
+ {
+ // no field entered - return all fields
+
+ $all_post_fields = array();
+
+ // loop through the full _POST array
+ foreach( $_POST as $key )
+ {
+ $all_post_fields[$key] = $this->_fetch_from_array($_POST, $key, $xss_clean);
+ }
+ return $all_post_fields;
+
+ }
+
return $this->_fetch_from_array($_POST, $index, $xss_clean);
}