Merge remote-tracking branch 'upstream/develop' into ap-forum

This commit is contained in:
Michael 2020-08-10 14:00:17 +00:00
commit 2c97e2190b
7 changed files with 115 additions and 33 deletions

View file

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