From 743a41d29cbc855aa466b10a05cbd008af7201fe Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 30 Oct 2018 12:30:10 +0100 Subject: [PATCH] fixed changes in pandora mobile --- pandora_console/include/functions_groups.php | 2 ++ pandora_console/mobile/include/system.class.php | 4 ---- pandora_console/mobile/include/user.class.php | 3 +-- pandora_console/mobile/index.php | 6 ++---- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/pandora_console/include/functions_groups.php b/pandora_console/include/functions_groups.php index 2ce647c324..cd99934dd7 100644 --- a/pandora_console/include/functions_groups.php +++ b/pandora_console/include/functions_groups.php @@ -14,6 +14,8 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. +global $config; + require_once ($config['homedir'].'/include/functions_users.php'); /** diff --git a/pandora_console/mobile/include/system.class.php b/pandora_console/mobile/include/system.class.php index a1c0c7e672..d2c45f0e6c 100644 --- a/pandora_console/mobile/include/system.class.php +++ b/pandora_console/mobile/include/system.class.php @@ -12,10 +12,6 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -if (!isset($config)) { - require_once('../include/config.php'); -} - //Singleton class System { private static $instance; diff --git a/pandora_console/mobile/include/user.class.php b/pandora_console/mobile/include/user.class.php index 41278f2ad5..d3793beff0 100644 --- a/pandora_console/mobile/include/user.class.php +++ b/pandora_console/mobile/include/user.class.php @@ -34,10 +34,9 @@ class User { self::$instance = $user; } else { - self::$instance = new self; + self::$instance = new self(); } } - return self::$instance; } diff --git a/pandora_console/mobile/index.php b/pandora_console/mobile/index.php index 2a8f8ed396..368f00a25d 100644 --- a/pandora_console/mobile/index.php +++ b/pandora_console/mobile/index.php @@ -25,6 +25,8 @@ require_once("include/system.class.php"); require_once("include/db.class.php"); require_once("include/user.class.php"); +require_once('../include/config.php'); + require_once('operation/home.php'); require_once('operation/tactical.php'); require_once('operation/groups.php'); @@ -78,10 +80,6 @@ require_once($system->getConfig('homedir').'/include/constants.php'); $user = User::getInstance(); -if (!is_object($user) && gettype($user) == 'object') { - $user = unserialize (serialize ($user)); -} - $user->saveLogin(); $default_page = 'home';