Split and delete ModuleController

- $moduleName is part of the argument string => App\Arguments
- $isBackend boolean already part of App\Mode::isBackend()
- $module is now the direct return of App\Router::getModule()
- ModuleController::run() moved to BaseModule::run()
This commit is contained in:
Philipp 2021-11-19 22:47:49 +01:00
parent a5ab184fb8
commit b5d2d32b44
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
17 changed files with 299 additions and 793 deletions

View file

@ -182,7 +182,7 @@ class Nav
if (Session::isAuthenticated()) {
$nav['logout'] = ['logout', DI::l10n()->t('Logout'), '', DI::l10n()->t('End this session')];
} else {
$nav['login'] = ['login', DI::l10n()->t('Login'), (DI::module()->getName() == 'login' ? 'selected' : ''), DI::l10n()->t('Sign in')];
$nav['login'] = ['login', DI::l10n()->t('Login'), (DI::args()->getModuleName() == 'login' ? 'selected' : ''), DI::l10n()->t('Sign in')];
}
if ($a->isLoggedIn()) {
@ -208,7 +208,7 @@ class Nav
$homelink = Session::get('visitor_home', '');
}
if ((DI::module()->getName() != 'home') && (! (local_user()))) {
if ((DI::args()->getModuleName() != 'home') && (! (local_user()))) {
$nav['home'] = [$homelink, DI::l10n()->t('Home'), '', DI::l10n()->t('Home Page')];
}