mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-29 18:59: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 'common.php';
|
||||||
require_once SYSTEM . 'functions.php';
|
require_once SYSTEM . 'functions.php';
|
||||||
|
|
||||||
$app = new \MyAAC\App\App();
|
app()->run();
|
||||||
$app->run();
|
|
||||||
|
@ -35,6 +35,11 @@ class App
|
|||||||
$loginService = new LoginService();
|
$loginService = new LoginService();
|
||||||
$checkLogin = $loginService->checkLogin();
|
$checkLogin = $loginService->checkLogin();
|
||||||
$this->accountLogged = $checkLogin['account'];
|
$this->accountLogged = $checkLogin['account'];
|
||||||
|
$this->isLoggedIn = $checkLogin['logged'];
|
||||||
|
|
||||||
|
global $logged, $account_logged;
|
||||||
|
$logged = $this->isLoggedIn;
|
||||||
|
$account_logged = $this->accountLogged;
|
||||||
|
|
||||||
$statusService = new StatusService();
|
$statusService = new StatusService();
|
||||||
$status = $statusService->checkStatus();
|
$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'];
|
$title_full = (isset($title) ? $title . ' - ' : '') . $config['lua']['serverName'];
|
||||||
|
$menus = get_template_menus();
|
||||||
global $logged, $account_logged;
|
|
||||||
$logged = $checkLogin['logged'];
|
|
||||||
$account_logged = $checkLogin['account'];
|
|
||||||
|
|
||||||
require $template_path . '/' . $template_index;
|
require $template_path . '/' . $template_index;
|
||||||
|
|
||||||
|
@ -92,11 +92,8 @@ class RouterService
|
|||||||
|
|
||||||
$ignore = false;
|
$ignore = false;
|
||||||
|
|
||||||
/** @var boolean $logged */
|
|
||||||
/** @var \OTS_Account $account_logged */
|
|
||||||
global $logged_access;
|
global $logged_access;
|
||||||
$logged_access = 0;
|
$logged_access = 0;
|
||||||
$account_logged = app()->getAccountLogged();
|
|
||||||
if($logged && $account_logged && $account_logged->isLoaded()) {
|
if($logged && $account_logged && $account_logged->isLoaded()) {
|
||||||
$logged_access = $account_logged->getAccess();
|
$logged_access = $account_logged->getAccess();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user