Skip to content

Commit

Permalink
Refs #332. Beginning fix for multiple session starts.
Browse files Browse the repository at this point in the history
  • Loading branch information
predominant committed Mar 26, 2010
1 parent 2e11f63 commit 7b17374
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions cake/libs/cake_session.php
Expand Up @@ -114,6 +114,13 @@ class CakeSession extends Object {
*/
var $id = null;

/**
* Session Started
*
* @var boolean
* @access public
*/
var $started = false;
/**
* Constructor.
*
Expand Down Expand Up @@ -181,16 +188,19 @@ function __construct($base = null, $start = true) {
/**
* Starts the Session.
*
* @param string $name Variable name to check for
* @return boolean True if variable is there
* @return boolean True if session was started
* @access public
*/
function start() {
if ($this->started) {
return true;
}
if (function_exists('session_write_close')) {
session_write_close();
}
$this->__initSession();
return $this->__startSession();
$this->started = $this->__startSession();
return $this->started;
}

/**
Expand Down

0 comments on commit 7b17374

Please sign in to comment.