This commit is contained in:
predominant 2010-03-26 14:21:08 +11:00
parent 7b17374cad
commit 13a55b6cd8

View file

@ -118,9 +118,9 @@ class CakeSession extends Object {
* Session Started * Session Started
* *
* @var boolean * @var boolean
* @access public * @access protected
*/ */
var $started = false; var $_started = false;
/** /**
* Constructor. * Constructor.
* *
@ -192,15 +192,15 @@ class CakeSession extends Object {
* @access public * @access public
*/ */
function start() { function start() {
if ($this->started) { if ($this->started()) {
return true; return true;
} }
if (function_exists('session_write_close')) { if (function_exists('session_write_close')) {
session_write_close(); session_write_close();
} }
$this->__initSession(); $this->__initSession();
$this->started = $this->__startSession(); $this->_started = $this->__startSession();
return $this->started; return $this->started();
} }
/** /**
@ -210,7 +210,7 @@ class CakeSession extends Object {
* @return boolean True if session has been started. * @return boolean True if session has been started.
*/ */
function started() { function started() {
if (isset($_SESSION)) { if (isset($_SESSION) && $this->_started) {
return true; return true;
} }
return false; return false;
@ -243,7 +243,7 @@ class CakeSession extends Object {
$this->id = $id; $this->id = $id;
session_id($this->id); session_id($this->id);
} }
if (isset($_SESSION)) { if ($this->started()) {
return session_id(); return session_id();
} else { } else {
return $this->id; return $this->id;