From 4a0f350a3bacdc0122992dcd504c5abeb1dd0078 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Diaz Date: Thu, 15 Oct 2015 13:45:51 +0200 Subject: [PATCH] Fixed pandora console (mobile version). Ticket#2893 --- pandora_console/mobile/include/system.class.php | 7 ++++--- pandora_console/mobile/index.php | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pandora_console/mobile/include/system.class.php b/pandora_console/mobile/include/system.class.php index 8f837a468b..85feae39ad 100644 --- a/pandora_console/mobile/include/system.class.php +++ b/pandora_console/mobile/include/system.class.php @@ -25,10 +25,11 @@ class System { function __construct() { $this->loadConfig(); - + $session_id = session_id(); DB::getInstance($this->getConfig('db_engine', 'mysql')); - - session_start(); + if (empty($session_id)) { + session_start(); + } $this->session = $_SESSION; session_write_close(); } diff --git a/pandora_console/mobile/index.php b/pandora_console/mobile/index.php index 7a7f5c0414..c9da43fb05 100644 --- a/pandora_console/mobile/index.php +++ b/pandora_console/mobile/index.php @@ -46,6 +46,11 @@ $system = System::getInstance(); require_once($system->getConfig('homedir').'/include/constants.php'); $user = User::getInstance(); + +if (!is_object($user) && gettype($user) == 'object') { + $user = unserialize (serialize ($user)); +} + $user->saveLogin(); $page = $system->getRequest('page', 'home');