mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Moving a few things around to better replicate how CakeSession behaved in 1.3. Also fixes the countdown & session id regeneration feature. Still need to write a test case for it though.
This commit is contained in:
parent
d2097c514f
commit
81f6f43193
1 changed files with 5 additions and 4 deletions
|
@ -153,10 +153,9 @@ class CakeSession {
|
|||
if ($start === true) {
|
||||
self::_setPath($base);
|
||||
self::_setHost(env('HTTP_HOST'));
|
||||
self::start();
|
||||
}
|
||||
if (isset($_SESSION) || $start === true) {
|
||||
self::$sessionTime = self::$time + (Configure::read('Session.timeout') * 60);
|
||||
self::start();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -233,12 +232,12 @@ class CakeSession {
|
|||
if (self::started()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$id = self::id();
|
||||
session_write_close();
|
||||
self::_configureSession();
|
||||
self::_startSession();
|
||||
|
||||
if ((!self::id() && self::started()) || empty($_SESSION)) {
|
||||
if (!$id && self::started()) {
|
||||
self::_checkValid();
|
||||
}
|
||||
|
||||
|
@ -571,6 +570,8 @@ class CakeSession {
|
|||
array($class, 'gc')
|
||||
);
|
||||
}
|
||||
Configure::write('Session', $sessionConfig);
|
||||
self::$sessionTime = self::$time + ($sessionConfig['timeout'] * 60);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue