Remove deprecated App::module - replace with DI::module()->getName()

This commit is contained in:
nupplaPhil 2019-12-16 01:35:26 +01:00
parent 33674808dc
commit 4835f1185f
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
8 changed files with 72 additions and 49 deletions

View file

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