Many deprecated function calls are replaced

This commit is contained in:
Michael 2024-05-13 16:19:19 +00:00
parent cfad5809ff
commit 60f5fd8188
28 changed files with 61 additions and 71 deletions

View file

@ -398,7 +398,7 @@ class Account extends BaseSettings
$username = $user['username'];
$email = $user['email'];
$nickname = $a->getLoggedInUserNickname();
$nickname = DI::userSession()->getLocalUserNickname();
$timezone = $user['timezone'];
$language = $user['language'];
$notify = $user['notify-flags'];

View file

@ -55,7 +55,7 @@ class Crop extends BaseSettings
$selectionW = intval($_POST['width'] ?? 0);
$selectionH = intval($_POST['height'] ?? 0);
$path = 'profile/' . DI::app()->getLoggedInUserNickname();
$path = 'profile/' . DI::userSession()->getLocalUserNickname();
$base_image = Photo::selectFirst([], ['resource-id' => $resource_id, 'uid' => DI::userSession()->getLocalUserId(), 'scale' => $scale]);
if (DBA::isResult($base_image)) {
@ -195,7 +195,7 @@ class Crop extends BaseSettings
DI::sysmsg()->addInfo(DI::l10n()->t('Profile picture successfully updated.'));
DI::baseUrl()->redirect('profile/' . DI::app()->getLoggedInUserNickname());
DI::baseUrl()->redirect('profile/' . DI::userSession()->getLocalUserNickname());
}
$Image = Photo::getImageForPhoto($photos[0]);

View file

@ -131,7 +131,7 @@ class Index extends BaseSettings
DI::l10n()->t('or'),
($newuser) ?
'<a href="' . DI::baseUrl() . '">' . DI::l10n()->t('skip this step') . '</a>'
: '<a href="' . DI::baseUrl() . '/profile/' . DI::app()->getLoggedInUserNickname() . '/photos">'
: '<a href="' . DI::baseUrl() . '/profile/' . DI::userSession()->getLocalUserNickname() . '/photos">'
. DI::l10n()->t('select a photo from your photo albums') . '</a>'
),
]);