X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FBaseProfile.php;h=b7584d9db6098c7fde3caa3600bb3ef085ed46dc;hb=f0743e4e128dfcb5d6305f4ed09e969573ba6b15;hp=56577ef33ac4e03d6b418dc2c2cbfa25dd908a82;hpb=25992b063ac984d42c8d0f63f45f77eab1ee34be;p=friendica.git diff --git a/src/Module/BaseProfile.php b/src/Module/BaseProfile.php index 56577ef33a..b7584d9db6 100644 --- a/src/Module/BaseProfile.php +++ b/src/Module/BaseProfile.php @@ -1,6 +1,6 @@ 'r', ], [ - 'label' => DI::l10n()->t('Status'), - 'url' => $baseProfileUrl . '/status', + 'label' => DI::l10n()->t('Conversations'), + 'url' => $baseProfileUrl . '/conversations', 'sel' => $current == 'status' ? 'active' : '', - 'title' => DI::l10n()->t('Status Messages and Posts'), + 'title' => DI::l10n()->t('Conversations started'), 'id' => 'status-tab', 'accesskey' => 'm', ], @@ -79,7 +80,7 @@ class BaseProfile extends BaseModule ]; // the calendar link for the full-featured events calendar - if ($is_owner && $a->getThemeInfoValue('events_in_profile')) { + if ($is_owner) { $tabs[] = [ 'label' => DI::l10n()->t('Calendar'), 'url' => DI::baseUrl() . '/calendar', @@ -88,17 +89,18 @@ class BaseProfile extends BaseModule 'id' => 'calendar-tab', 'accesskey' => 'c', ]; - // if the user is not the owner of the calendar we only show a calendar - // with the public events of the calendar owner - } elseif (!$is_owner) { - $tabs[] = [ - 'label' => DI::l10n()->t('Calendar'), - 'url' => DI::baseUrl() . '/calendar/show/' . $nickname, - 'sel' => $current == 'calendar' ? 'active' : '', - 'title' => DI::l10n()->t('Calendar'), - 'id' => 'calendar-tab', - 'accesskey' => 'c', - ]; + } else { + $owner = User::getByNickname($nickname, ['uid']); + if(DI::userSession()->isAuthenticated() || $owner && Feature::isEnabled($owner['uid'], 'public_calendar')) { + $tabs[] = [ + 'label' => DI::l10n()->t('Calendar'), + 'url' => DI::baseUrl() . '/calendar/show/' . $nickname, + 'sel' => $current == 'calendar' ? 'active' : '', + 'title' => DI::l10n()->t('Calendar'), + 'id' => 'calendar-tab', + 'accesskey' => 'c', + ]; + } } if ($is_owner) {