From c15e17c3fe6110a4e08a56cde3514c02359fe080 Mon Sep 17 00:00:00 2001 From: Mike Funk Date: Thu, 23 Feb 2012 14:56:18 -0500 Subject: added all_flashdata function to Session.php --- system/libraries/Session.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'system') diff --git a/system/libraries/Session.php b/system/libraries/Session.php index 66b39a6a2..a594d24ef 100644 --- a/system/libraries/Session.php +++ b/system/libraries/Session.php @@ -468,6 +468,29 @@ class CI_Session { { return $this->userdata; } + + // -------------------------------------------------------------------------- + + /** + * Fetch all flashdata + * + * @return array + */ + public function all_flashdata() + { + $out = array(); + + // loop through all userdata + foreach ($this->all_userdata() as $key => $val) + { + // if it contains flashdata, add it + if (strpos($key, 'flash:old:') !== FALSE) + { + $out[$key] = $val; + } + } + return $out; + } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 64d72b1b85efd3810a036b54d40d36ade6cd9f86 Mon Sep 17 00:00:00 2001 From: Mike Funk Date: Thu, 23 Feb 2012 15:07:21 -0500 Subject: removed active_rec change. --- system/database/DB_active_rec.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index 429f65186..424735157 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -988,7 +988,7 @@ class CI_DB_active_record extends CI_DB_driver { */ public function limit($value, $offset = NULL) { - $this->ar_limit = $value; + $this->ar_limit = (int) $value; if ( ! is_null($offset)) { -- cgit v1.2.3-24-g4f1b From c91a66cd7c770f8060cbe366491c1f4de9147da4 Mon Sep 17 00:00:00 2001 From: Mike Funk Date: Tue, 28 Feb 2012 13:46:00 -0500 Subject: tab separation in docblock. --- system/libraries/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/libraries/Session.php b/system/libraries/Session.php index a594d24ef..c14b11fa3 100644 --- a/system/libraries/Session.php +++ b/system/libraries/Session.php @@ -474,7 +474,7 @@ class CI_Session { /** * Fetch all flashdata * - * @return array + * @return array */ public function all_flashdata() { -- cgit v1.2.3-24-g4f1b