mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 12:36:25 +00:00
Refs #332. Beginning fix for multiple session starts.
This commit is contained in:
parent
2e11f63bd4
commit
7b17374cad
1 changed files with 13 additions and 3 deletions
|
@ -114,6 +114,13 @@ class CakeSession extends Object {
|
||||||
*/
|
*/
|
||||||
var $id = null;
|
var $id = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Session Started
|
||||||
|
*
|
||||||
|
* @var boolean
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
var $started = false;
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
|
@ -181,16 +188,19 @@ class CakeSession extends Object {
|
||||||
/**
|
/**
|
||||||
* Starts the Session.
|
* Starts the Session.
|
||||||
*
|
*
|
||||||
* @param string $name Variable name to check for
|
* @return boolean True if session was started
|
||||||
* @return boolean True if variable is there
|
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function start() {
|
function start() {
|
||||||
|
if ($this->started) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (function_exists('session_write_close')) {
|
if (function_exists('session_write_close')) {
|
||||||
session_write_close();
|
session_write_close();
|
||||||
}
|
}
|
||||||
$this->__initSession();
|
$this->__initSession();
|
||||||
return $this->__startSession();
|
$this->started = $this->__startSession();
|
||||||
|
return $this->started;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue