summaryrefslogtreecommitdiffstats
path: root/system/core/Input.php
diff options
context:
space:
mode:
authorvascopj <devnull@localhost>2011-02-13 22:30:19 +0100
committervascopj <devnull@localhost>2011-02-13 22:30:19 +0100
commitff1cfa1ae5c5440bfde35c36ecb4cdcd73cd3966 (patch)
treeb45900e1bdf43a0159c54237c92a51ccc3a2a77a /system/core/Input.php
parent0ba58b81b65c2059210b921856489b5faaa81369 (diff)
Updated the post method and added the new functionality to the get method also
Updated the documentation
Diffstat (limited to 'system/core/Input.php')
-rw-r--r--system/core/Input.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index fa8080deb..1be591508 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);
}
@@ -127,7 +143,7 @@ class CI_Input {
function post($index = '', $xss_clean = FALSE)
{
// check if a field has been entered
- if( empty($index ) )
+ if( empty($index) AND is_array($_POST) AND count($_POST) )
{
// no field entered - return all fields