X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FBaseProfile.php;h=5510b94112e54328b3d0b9dd4099d7aeb9f55c47;hb=fd7c1d766c2c922909b858f7af6aa440fbc697aa;hp=dca88f01c2b12d24a2286e83d4b59a2d0500f98b;hpb=5a87ccf0261733096f634cb03314604891e5f48a;p=friendica.git diff --git a/src/Module/BaseProfile.php b/src/Module/BaseProfile.php index dca88f01c2..5510b94112 100644 --- a/src/Module/BaseProfile.php +++ b/src/Module/BaseProfile.php @@ -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 = [ @@ -71,12 +69,12 @@ class BaseProfile extends BaseModule 'accesskey' => 'h', ], [ - 'label' => DI::l10n()->t('Videos'), - 'url' => DI::baseUrl() . '/videos/' . $nickname, - 'sel' => $current == 'videos' ? 'active' : '', - 'title' => DI::l10n()->t('Videos'), - 'id' => 'video-tab', - 'accesskey' => 'v', + 'label' => DI::l10n()->t('Media'), + 'url' => $baseProfileUrl . '/media', + 'sel' => $current == 'media' ? 'active' : '', + 'title' => DI::l10n()->t('Media'), + 'id' => 'media-tab', + 'accesskey' => 'd', ], ]; @@ -112,9 +110,17 @@ class BaseProfile extends BaseModule 'id' => 'notes-tab', 'accesskey' => 't', ]; + $tabs[] = [ + 'label' => DI::l10n()->t('Scheduled Posts'), + 'url' => $baseProfileUrl . '/schedule', + 'sel' => $current == 'schedule' ? 'active' : '', + 'title' => DI::l10n()->t('Posts that are scheduled for publishing'), + 'id' => 'schedule-tab', + 'accesskey' => 'o', + ]; } - if (empty($profile['hide-friends'])) { + if (!$hide_friends) { $tabs[] = [ 'label' => DI::l10n()->t('Contacts'), 'url' => $baseProfileUrl . '/contacts',