Some more deprecated function calls are replaced

This commit is contained in:
Michael 2024-05-14 08:37:10 +00:00
parent bd6616e84f
commit e12f92e516
30 changed files with 101 additions and 163 deletions

View file

@ -57,9 +57,9 @@ function theme_post(App $a)
}
}
function theme_admin_post(App $a)
function theme_admin_post()
{
if (!$a->isSiteAdmin()) {
if (!DI::userSession()->isSiteAdmin()) {
return;
}

View file

@ -199,7 +199,7 @@ function frio_remote_nav(array &$nav_info)
{
if (DI::mode()->has(App\Mode::MAINTENANCEDISABLED)) {
// get the homelink from $_SESSION
$homelink = Profile::getMyURL();
$homelink = DI::userSession()->getMyUrl();
if (!$homelink) {
$homelink = DI::session()->get('visitor_home', '');
}
@ -212,7 +212,7 @@ function frio_remote_nav(array &$nav_info)
} elseif (!DI::userSession()->getLocalUserId() && DI::userSession()->getRemoteUserId()) {
$remoteUser = Contact::getById(DI::userSession()->getRemoteUserId(), $fields);
$nav_info['nav']['remote'] = DI::l10n()->t('Guest');
} elseif (Profile::getMyURL()) {
} elseif (DI::userSession()->getMyUrl()) {
$remoteUser = Contact::getByURL($homelink, null, $fields);
$nav_info['nav']['remote'] = DI::l10n()->t('Visitor');
} else {