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:
mark_story 2010-07-26 00:32:31 -04:00
parent d2097c514f
commit 81f6f43193

View file

@ -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);
}
/**