From dd6719738936be31cdaa1758ca86d5eb14dcab3d Mon Sep 17 00:00:00 2001 From: Barry Mieny Date: Mon, 4 Oct 2010 16:33:58 +0200 Subject: Cleanup of stray spaces and tabs --- system/libraries/Session.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'system/libraries/Session.php') diff --git a/system/libraries/Session.php b/system/libraries/Session.php index fc3ee0542..342c301e3 100644 --- a/system/libraries/Session.php +++ b/system/libraries/Session.php @@ -39,7 +39,7 @@ class CI_Session { var $cookie_domain = ''; var $sess_time_to_update = 300; var $encryption_key = ''; - var $flashdata_key = 'flash'; + var $flashdata_key = 'flash'; var $time_reference = 'time'; var $gc_probability = 5; var $userdata = array(); @@ -96,7 +96,7 @@ class CI_Session { { $this->sess_expiration = (60*60*24*365*2); } - + // Set the cookie name $this->sess_cookie_name = $this->cookie_prefix.$this->sess_cookie_name; @@ -112,10 +112,10 @@ class CI_Session { } // Delete 'old' flashdata (from last request) - $this->_flashdata_sweep(); + $this->_flashdata_sweep(); // Mark all new flashdata as old (data will be deleted before next request) - $this->_flashdata_mark(); + $this->_flashdata_mark(); // Delete expired sessions if necessary $this->_sess_gc(); @@ -313,9 +313,9 @@ class CI_Session { $sessid .= $this->CI->input->ip_address(); $this->userdata = array( - 'session_id' => md5(uniqid($sessid, TRUE)), - 'ip_address' => $this->CI->input->ip_address(), - 'user_agent' => substr($this->CI->input->user_agent(), 0, 50), + 'session_id' => md5(uniqid($sessid, TRUE)), + 'ip_address' => $this->CI->input->ip_address(), + 'user_agent' => substr($this->CI->input->user_agent(), 0, 50), 'last_activity' => $this->now ); @@ -656,9 +656,9 @@ class CI_Session { // if encryption is not used, we provide an md5 hash to prevent userside tampering $cookie_data = $cookie_data.md5($cookie_data.$this->encryption_key); } - + $expire = ($this->sess_expire_on_close === TRUE) ? 0 : $this->sess_expiration + time(); - + // Set the cookie setcookie( $this->sess_cookie_name, @@ -690,7 +690,7 @@ class CI_Session { { if (is_string($val)) { - $data[$key] = str_replace('\\', '{{slash}}', $val); + $data[$key] = str_replace('\\', '{{slash}}', $val); } } } @@ -698,7 +698,7 @@ class CI_Session { { if (is_string($data)) { - $data = str_replace('\\', '{{slash}}', $data); + $data = str_replace('\\', '{{slash}}', $data); } } @@ -727,7 +727,7 @@ class CI_Session { { if (is_string($val)) { - $data[$key] = str_replace('{{slash}}', '\\', $val); + $data[$key] = str_replace('{{slash}}', '\\', $val); } } -- cgit v1.2.3-24-g4f1b From 71eee841e278ba5d08f836c047ef3c2e38fa34e1 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Tue, 5 Oct 2010 09:40:43 -0500 Subject: fixed bug where sess_expire_on_close was not being set from a config file, fixes #173 --- system/libraries/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/libraries/Session.php') diff --git a/system/libraries/Session.php b/system/libraries/Session.php index fc3ee0542..7394e5897 100644 --- a/system/libraries/Session.php +++ b/system/libraries/Session.php @@ -61,7 +61,7 @@ class CI_Session { // Set all the session preferences, which can either be set // manually via the $params array above or via the config file - foreach (array('sess_encrypt_cookie', 'sess_use_database', 'sess_table_name', 'sess_expiration', 'sess_match_ip', 'sess_match_useragent', 'sess_cookie_name', 'cookie_path', 'cookie_domain', 'sess_time_to_update', 'time_reference', 'cookie_prefix', 'encryption_key') as $key) + foreach (array('sess_encrypt_cookie', 'sess_use_database', 'sess_table_name', 'sess_expiration', 'sess_expire_on_close', 'sess_match_ip', 'sess_match_useragent', 'sess_cookie_name', 'cookie_path', 'cookie_domain', 'sess_time_to_update', 'time_reference', 'cookie_prefix', 'encryption_key') as $key) { $this->$key = (isset($params[$key])) ? $params[$key] : $this->CI->config->item($key); } -- cgit v1.2.3-24-g4f1b