Remove direct calls to App->user

This commit is contained in:
Michael 2021-08-08 10:14:56 +00:00
parent 266ee26240
commit fc283ab928
51 changed files with 238 additions and 166 deletions

View file

@ -39,10 +39,8 @@ class BaseProfile extends BaseModule
* @return string
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public static function getTabsHTML(App $a, string $current, bool $is_owner, array $profile)
public static function getTabsHTML(App $a, string $current, bool $is_owner, string $nickname, bool $hide_friends)
{
$nickname = $profile['nickname'];
$baseProfileUrl = DI::baseUrl() . '/profile/' . $nickname;
$tabs = [
@ -123,7 +121,7 @@ class BaseProfile extends BaseModule
];
}
if (empty($profile['hide-friends'])) {
if (!$hide_friends) {
$tabs[] = [
'label' => DI::l10n()->t('Contacts'),
'url' => $baseProfileUrl . '/contacts',