]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/BaseProfile.php
Remove unused first parameter from BaseProfile::getTabsHTML
[friendica.git] / src / Module / BaseProfile.php
index 5510b94112e54328b3d0b9dd4099d7aeb9f55c47..1347ae0df335fbad2eee7e4af7afc2013a87fddc 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -32,14 +32,13 @@ class BaseProfile extends BaseModule
        /**
         * Returns the HTML for the profile pages tabs
         *
-        * @param App    $a
         * @param string $current
         * @param bool   $is_owner
         * @param string $nickname
         * @return string
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function getTabsHTML(App $a, string $current, bool $is_owner, string $nickname, bool $hide_friends)
+       public static function getTabsHTML(string $current, bool $is_owner, string $nickname, bool $hide_friends)
        {
                $baseProfileUrl = DI::baseUrl() . '/profile/' . $nickname;
 
@@ -62,7 +61,7 @@ class BaseProfile extends BaseModule
                        ],
                        [
                                'label' => DI::l10n()->t('Photos'),
-                               'url'   => DI::baseUrl() . '/photos/' . $nickname,
+                               'url'   => $baseProfileUrl . '/photos',
                                'sel'   => $current == 'photos' ? 'active' : '',
                                'title' => DI::l10n()->t('Photo Albums'),
                                'id'    => 'photo-tab',
@@ -78,26 +77,26 @@ class BaseProfile extends BaseModule
                        ],
                ];
 
-               // the calendar link for the full featured events calendar
-               if ($is_owner && $a->getThemeInfoValue('events_in_profile')) {
+               // the calendar link for the full-featured events calendar
+               if ($is_owner) {
                        $tabs[] = [
-                               'label' => DI::l10n()->t('Events'),
-                               'url'   => DI::baseUrl() . '/events',
-                               'sel'   => $current == 'events' ? 'active' : '',
-                               'title' => DI::l10n()->t('Events and Calendar'),
-                               'id'    => 'events-tab',
-                               'accesskey' => 'e',
+                               'label' => DI::l10n()->t('Calendar'),
+                               'url'   => DI::baseUrl() . '/calendar',
+                               'sel'   => $current == 'calendar' ? 'active' : '',
+                               'title' => DI::l10n()->t('Calendar'),
+                               '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) {
+               } else {
                        $tabs[] = [
-                               'label' => DI::l10n()->t('Events'),
-                               'url'   => DI::baseUrl() . '/cal/' . $nickname,
-                               'sel'   => $current == 'cal' ? 'active' : '',
-                               'title' => DI::l10n()->t('Events and Calendar'),
-                               'id'    => 'events-tab',
-                               'accesskey' => 'e',
+                               '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',
                        ];
                }