diff options
author | Ahmad Anbar <aanbar@gmail.com> | 2015-02-08 17:29:52 +0100 |
---|---|---|
committer | Ahmad Anbar <aanbar@gmail.com> | 2015-02-08 17:29:52 +0100 |
commit | ed520408514fff6486788e1543589418d24d885e (patch) | |
tree | 07fd3194e9c6baf7aeaa9ccdd164e3fec4494922 /system/libraries/Session/Session.php | |
parent | e5454f9b28f123a5549971f580255a065b2f8cc2 (diff) | |
parent | 266c93cc505ae9a8cafb41f9d9432b056de492e0 (diff) |
Merge remote-tracking branch 'upstream/develop' into develop
Diffstat (limited to 'system/libraries/Session/Session.php')
-rw-r--r-- | system/libraries/Session/Session.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 2551e54e9..de9b1e829 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -143,8 +143,7 @@ class CI_Session { session_start(); // Is session ID auto-regeneration configured? (ignoring ajax requests) - if ( ! empty($_SERVER['HTTP_X_REQUESTED_WITH']) - && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest' + if ((empty($_SERVER['HTTP_X_REQUESTED_WITH']) OR strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) !== 'xmlhttprequest') && ($regenerate_time = config_item('sess_time_to_update')) > 0 ) { @@ -154,7 +153,7 @@ class CI_Session { } elseif ($_SESSION['__ci_last_regenerate'] < (time() - $regenerate_time)) { - $this->sess_regenerate(FALSE); + $this->sess_regenerate((bool) config_item('sess_regenerate_destroy')); } } // Another work-around ... PHP doesn't seem to send the session cookie |