From f57a46b48287d7e5e5807100156e73730cf74e0c Mon Sep 17 00:00:00 2001 From: Kyle Farris Date: Mon, 29 Aug 2011 23:26:07 -0300 Subject: Added the 'user_data' key to the userdata property so that sessions using a database can be deleted properly when using the table schema found in the "Saving Session Data to a Database" section of the Session Class in the user guide. --- system/libraries/Session.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'system') diff --git a/system/libraries/Session.php b/system/libraries/Session.php index 2c8a80163..8ee08c5b2 100644 --- a/system/libraries/Session.php +++ b/system/libraries/Session.php @@ -317,7 +317,8 @@ class CI_Session { 'session_id' => md5(uniqid($sessid, TRUE)), 'ip_address' => $this->CI->input->ip_address(), 'user_agent' => substr($this->CI->input->user_agent(), 0, 120), - 'last_activity' => $this->now + 'last_activity' => $this->now, + 'user_data' => '' ); -- cgit v1.2.3-24-g4f1b From 7fe625aa1b294d135c860a79830da12658238c7e Mon Sep 17 00:00:00 2001 From: Pedro Junior Date: Mon, 5 Sep 2011 09:47:09 -0300 Subject: CI_Profiler => Accepting objects while profiling session data. --- system/libraries/Profiler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 330acce73..ac58129a9 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -506,7 +506,7 @@ class CI_Profiler { foreach ($this->CI->session->all_userdata() as $key => $val) { - if (is_array($val)) + if (is_array($val) || is_object($val)) { $val = print_r($val, TRUE); } -- cgit v1.2.3-24-g4f1b From bff3dfda42b58289c41f88342a0ab17846f52f3b Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Wed, 7 Sep 2011 18:54:25 +0200 Subject: Use NULL as the default value for offset in limit(x, offset) so that default is not LIMIT 0. --- system/database/DB_active_rec.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system') diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index 89766e304..7162e2ac5 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -872,11 +872,11 @@ class CI_DB_active_record extends CI_DB_driver { * @param integer the offset value * @return object */ - public function limit($value, $offset = '') + public function limit($value, $offset = NULL) { $this->ar_limit = (int) $value; - if ($offset != '') + if ( ! is_null($offset)) { $this->ar_offset = (int) $offset; } -- cgit v1.2.3-24-g4f1b