old boot.php functions replaced in src/module (4)

This commit is contained in:
Michael 2022-10-19 04:43:47 +00:00 committed by Hypolite Petovan
parent de6eabde58
commit d47d78f2d4
22 changed files with 140 additions and 158 deletions

View file

@ -50,7 +50,7 @@ class Contacts extends Module\BaseProfile
throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
}
$is_owner = $profile['uid'] == local_user();
$is_owner = $profile['uid'] == Session::getLocalUser();
if ($profile['hide-friends'] && !$is_owner) {
throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
@ -60,7 +60,7 @@ class Contacts extends Module\BaseProfile
$o = self::getTabsHTML($a, 'contacts', $is_owner, $profile['nickname'], $profile['hide-friends']);
$tabs = self::getContactFilterTabs('profile/' . $nickname, $type, Session::isAuthenticated() && $profile['uid'] != local_user());
$tabs = self::getContactFilterTabs('profile/' . $nickname, $type, Session::isAuthenticated() && $profile['uid'] != Session::getLocalUser());
$condition = [
'uid' => $profile['uid'],