]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/BaseProfile.php
Merge pull request #10994 from nupplaphil/feat/module_constructor
[friendica.git] / src / Module / BaseProfile.php
index 832c8fd2f8928e53881f845159dc20ed5b2ed4a9..5510b94112e54328b3d0b9dd4099d7aeb9f55c47 100644 (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 = [
@@ -70,15 +68,14 @@ class BaseProfile extends BaseModule
                                'id'    => 'photo-tab',
                                'accesskey' => 'h',
                        ],
-// @todo Currently deactivated since it doesn't really work
-//                     [
-//                             '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',
+                       ],
                ];
 
                // the calendar link for the full featured events calendar
@@ -123,7 +120,7 @@ class BaseProfile extends BaseModule
                        ];
                }
 
-               if (empty($profile['hide-friends'])) {
+               if (!$hide_friends) {
                        $tabs[] = [
                                'label' => DI::l10n()->t('Contacts'),
                                'url'   => $baseProfileUrl . '/contacts',