fixed changes in pandora mobile

This commit is contained in:
daniel 2018-10-30 12:30:10 +01:00
parent 8e206eeeef
commit 743a41d29c
4 changed files with 5 additions and 10 deletions

View File

@ -14,6 +14,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
global $config;
require_once ($config['homedir'].'/include/functions_users.php'); require_once ($config['homedir'].'/include/functions_users.php');
/** /**

View File

@ -12,10 +12,6 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
if (!isset($config)) {
require_once('../include/config.php');
}
//Singleton //Singleton
class System { class System {
private static $instance; private static $instance;

View File

@ -34,10 +34,9 @@ class User {
self::$instance = $user; self::$instance = $user;
} }
else { else {
self::$instance = new self; self::$instance = new self();
} }
} }
return self::$instance; return self::$instance;
} }

View File

@ -25,6 +25,8 @@ require_once("include/system.class.php");
require_once("include/db.class.php"); require_once("include/db.class.php");
require_once("include/user.class.php"); require_once("include/user.class.php");
require_once('../include/config.php');
require_once('operation/home.php'); require_once('operation/home.php');
require_once('operation/tactical.php'); require_once('operation/tactical.php');
require_once('operation/groups.php'); require_once('operation/groups.php');
@ -78,10 +80,6 @@ require_once($system->getConfig('homedir').'/include/constants.php');
$user = User::getInstance(); $user = User::getInstance();
if (!is_object($user) && gettype($user) == 'object') {
$user = unserialize (serialize ($user));
}
$user->saveLogin(); $user->saveLogin();
$default_page = 'home'; $default_page = 'home';