summaryrefslogtreecommitdiffstats
path: root/system/libraries/Session/Session.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-25 22:09:11 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-25 22:09:11 +0100
commitf5513d6ac0ddc3f6a37df6f370c172cd1b2bfadb (patch)
tree527c4a633d7106cfd179aee6e02e498fbedb6917 /system/libraries/Session/Session.php
parent3545102a83a70a42876148037bec05f4bb32913e (diff)
parent3892995d21bc030ef8f6389abe1669d34c954ccd (diff)
Merge pull request #2026 from johnathancroom/keep_flash_data_array
keep_flashdata accepts array
Diffstat (limited to 'system/libraries/Session/Session.php')
-rw-r--r--system/libraries/Session/Session.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php
index b6c862dae..85a483592 100644
--- a/system/libraries/Session/Session.php
+++ b/system/libraries/Session/Session.php
@@ -387,11 +387,22 @@ class CI_Session extends CI_Driver_Library {
/**
* Keeps existing flashdata available to next request.
*
- * @param string Item key
+ * @param mixed Item key(s)
* @return void
*/
public function keep_flashdata($key)
{
+
+ if (is_array($key))
+ {
+ foreach ($key as $k)
+ {
+ $this->keep_flashdata($k);
+ }
+
+ return;
+ }
+
// 'old' flashdata gets removed. Here we mark all flashdata as 'new' to preserve it from _flashdata_sweep()
// Note the function will return NULL if the $key provided cannot be found
$old_flashdata_key = self::FLASHDATA_KEY.self::FLASHDATA_OLD.$key;