mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 01:09:21 +02:00
Fix app instance + $logged and $account_logged globals+ $menus
This commit is contained in:
parent
613b710d29
commit
b047f73fe6
@ -27,5 +27,4 @@
|
||||
require_once 'common.php';
|
||||
require_once SYSTEM . 'functions.php';
|
||||
|
||||
$app = new \MyAAC\App\App();
|
||||
$app->run();
|
||||
app()->run();
|
||||
|
@ -35,6 +35,11 @@ class App
|
||||
$loginService = new LoginService();
|
||||
$checkLogin = $loginService->checkLogin();
|
||||
$this->accountLogged = $checkLogin['account'];
|
||||
$this->isLoggedIn = $checkLogin['logged'];
|
||||
|
||||
global $logged, $account_logged;
|
||||
$logged = $this->isLoggedIn;
|
||||
$account_logged = $this->accountLogged;
|
||||
|
||||
$statusService = new StatusService();
|
||||
$status = $statusService->checkStatus();
|
||||
@ -76,12 +81,9 @@ class App
|
||||
]);
|
||||
}
|
||||
|
||||
global $template_path, $template_index;
|
||||
global $template_path, $template_index, $menus;
|
||||
$title_full = (isset($title) ? $title . ' - ' : '') . $config['lua']['serverName'];
|
||||
|
||||
global $logged, $account_logged;
|
||||
$logged = $checkLogin['logged'];
|
||||
$account_logged = $checkLogin['account'];
|
||||
$menus = get_template_menus();
|
||||
|
||||
require $template_path . '/' . $template_index;
|
||||
|
||||
|
@ -92,11 +92,8 @@ class RouterService
|
||||
|
||||
$ignore = false;
|
||||
|
||||
/** @var boolean $logged */
|
||||
/** @var \OTS_Account $account_logged */
|
||||
global $logged_access;
|
||||
$logged_access = 0;
|
||||
$account_logged = app()->getAccountLogged();
|
||||
if($logged && $account_logged && $account_logged->isLoaded()) {
|
||||
$logged_access = $account_logged->getAccess();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user