Merge branch 'ent-3143-mobile-console-session-unserialize-bugfix' into 'develop'
Fixed an object unserialize from the session See merge request artica/pandorafms!2012
This commit is contained in:
commit
47a1635916
|
@ -23,9 +23,7 @@ class System {
|
|||
$this->loadConfig();
|
||||
$session_id = session_id();
|
||||
DB::getInstance($this->getConfig('db_engine', 'mysql'));
|
||||
if (empty($session_id)) {
|
||||
session_start();
|
||||
}
|
||||
if (session_status() === PHP_SESSION_NONE) session_start();
|
||||
$this->session = $_SESSION;
|
||||
session_write_close();
|
||||
|
||||
|
@ -71,7 +69,7 @@ class System {
|
|||
}
|
||||
|
||||
public function setSessionBase($name, $value) {
|
||||
session_start();
|
||||
if (session_status() === PHP_SESSION_NONE) session_start();
|
||||
$_SESSION[$name] = $value;
|
||||
session_write_close();
|
||||
}
|
||||
|
@ -79,7 +77,7 @@ class System {
|
|||
public function setSession($name, $value) {
|
||||
$this->session[$name] = $value;
|
||||
|
||||
session_start();
|
||||
if (session_status() === PHP_SESSION_NONE) session_start();
|
||||
$_SESSION = $this->session;
|
||||
session_write_close();
|
||||
}
|
||||
|
@ -94,7 +92,7 @@ class System {
|
|||
}
|
||||
|
||||
public function sessionDestroy() {
|
||||
session_start();
|
||||
if (session_status() === PHP_SESSION_NONE) session_start();
|
||||
session_destroy();
|
||||
}
|
||||
|
||||
|
|
|
@ -19,13 +19,20 @@ if (function_exists ('mb_internal_encoding')) {
|
|||
}
|
||||
|
||||
$develop_bypass = 0;
|
||||
require_once '../include/config.php';
|
||||
|
||||
require_once("include/ui.class.php");
|
||||
require_once("include/system.class.php");
|
||||
require_once("include/db.class.php");
|
||||
require_once("include/user.class.php");
|
||||
|
||||
/* Info:
|
||||
* The classes above doesn't start any session before it's properly
|
||||
* configured into the file below, but it's important the classes
|
||||
* exist at the time the session is started for things like
|
||||
* serializing objects stored into the session.
|
||||
*/
|
||||
require_once '../include/config.php';
|
||||
|
||||
require_once('operation/home.php');
|
||||
require_once('operation/tactical.php');
|
||||
require_once('operation/groups.php');
|
||||
|
@ -78,7 +85,6 @@ $system = System::getInstance();
|
|||
require_once($system->getConfig('homedir').'/include/constants.php');
|
||||
|
||||
$user = User::getInstance();
|
||||
|
||||
$user->saveLogin();
|
||||
|
||||
$default_page = 'home';
|
||||
|
|
Loading…
Reference in New Issue