Skip to content
Permalink
Browse files

Moving a few things around to better replicate how CakeSession behave…

…d in 1.3. Also fixes the countdown & session id regeneration feature. Still need to write a test case for it though.
  • Loading branch information...
markstory committed Jul 26, 2010
1 parent d2097c5 commit 81f6f43193024aae187ed8263b00ac2bd916c2d3
Showing with 5 additions and 4 deletions.
  1. +5 −4 cake/libs/cake_session.php
@@ -153,10 +153,9 @@ public static function init($base = null, $start = true) {
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 @@ public static function start() {
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 @@ protected static function _configureSession() {
array($class, 'gc')
);
}
Configure::write('Session', $sessionConfig);
self::$sessionTime = self::$time + ($sessionConfig['timeout'] * 60);
}
/**

0 comments on commit 81f6f43

Please sign in to comment.
You can’t perform that action at this time.