mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 05:37:32 +02:00
Fix for session value-loss issue.
This commit is contained in:
@@ -118,6 +118,7 @@ class e_session
|
|||||||
|
|
||||||
protected $_namespace;
|
protected $_namespace;
|
||||||
protected $_name;
|
protected $_name;
|
||||||
|
protected $_sessionStarted = false; // Fixes lost $_SESSION value problem.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validation options
|
* Validation options
|
||||||
@@ -415,7 +416,8 @@ class e_session
|
|||||||
*/
|
*/
|
||||||
public function start($sessionName = null)
|
public function start($sessionName = null)
|
||||||
{
|
{
|
||||||
if (isset($_SESSION))
|
|
||||||
|
if (isset($_SESSION) && ($this->_sessionStarted == true))
|
||||||
{
|
{
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -424,7 +426,7 @@ class e_session
|
|||||||
{
|
{
|
||||||
session_save_path($this->_sessionSavePath);
|
session_save_path($this->_sessionSavePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($this->_sessionSaveMethod)
|
switch ($this->_sessionSaveMethod)
|
||||||
{
|
{
|
||||||
case 'db': // TODO session db handling, more methods (e.g. memcache)
|
case 'db': // TODO session db handling, more methods (e.g. memcache)
|
||||||
@@ -471,9 +473,9 @@ class e_session
|
|||||||
{
|
{
|
||||||
session_cache_limiter('private');
|
session_cache_limiter('private');
|
||||||
}
|
}
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
$this->_sessionStarted = true;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user