]> git.mxchange.org Git - friendica.git/commitdiff
Remove unused theme info value "events_in_profile"
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 30 Nov 2022 17:03:42 +0000 (12:03 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 1 Dec 2022 13:03:34 +0000 (08:03 -0500)
All public events (event if they are ownded by other users) are visible

src/App.php
src/Module/BaseProfile.php
src/Module/Calendar/Show.php
view/theme/frio/theme.php
view/theme/vier/theme.php

index abad4ee35d1f153ce760c53adbda23ffaec745e7..623a5b63a20a29b463bf78231394a503c07139bb 100644 (file)
@@ -69,7 +69,6 @@ class App
        private $theme_info = [
                'videowidth'        => 425,
                'videoheight'       => 350,
-               'events_in_profile' => true
        ];
 
        private $user_id       = 0;
index 56577ef33ac4e03d6b418dc2c2cbfa25dd908a82..10384e1578289c39db5b6f76a1fd1b67c7ec7d00 100644 (file)
@@ -79,7 +79,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',
@@ -90,7 +90,7 @@ class BaseProfile extends BaseModule
                        ];
                        // 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('Calendar'),
                                'url'   => DI::baseUrl() . '/calendar/show/' . $nickname,
index 9bcc004fd1868aaa0575d0580574db6d37c4d0a6..9c5c9c4526320fe1a524ed1fcbca93d9ef8caf8a 100644 (file)
@@ -85,16 +85,9 @@ class Show extends BaseModule
                $tabs = '';
 
                if (empty($this->parameters['nickname'])) {
-                       if ($this->app->getThemeInfoValue('events_in_profile')) {
-                               Nav::setSelected('home');
-                       } else {
-                               Nav::setSelected('calendar');
-                       }
-
-                       // tabs
-                       if ($this->app->getThemeInfoValue('events_in_profile')) {
-                               $tabs = BaseProfile::getTabsHTML($this->app, 'calendar', true, $this->app->getLoggedInUserNickname(), false);
-                       }
+                       Nav::setSelected('home');
+
+                       $tabs = BaseProfile::getTabsHTML($this->app, 'calendar', true, $this->app->getLoggedInUserNickname(), false);
 
                        $this->page['aside'] .= Widget\CalendarExport::getHTML($this->session->getLocalUserId());
                } else {
index c504678577bdd5f5c8602c91e887341d89d6713a..c8f22228b654fc5d2fa6593b0bf007da48610d41 100644 (file)
@@ -53,8 +53,6 @@ function frio_init(App $a)
        global $frio;
        $frio = 'view/theme/frio';
 
-       // disable the events module link in the profile tab
-       $a->setThemeInfoValue('events_in_profile', false);
        $a->setThemeInfoValue('videowidth', 622);
 
        Renderer::setActiveTemplateEngine('smarty3');
index 062e4a105c2e2324c7416bf1708c2a22eba9b348..65612623d2d9200e7693e0d9f130db9641e45dbe 100644 (file)
@@ -42,8 +42,6 @@ use Friendica\Util\Strings;
 
 function vier_init(App $a)
 {
-       $a->setThemeInfoValue('events_in_profile', false);
-
        Renderer::setActiveTemplateEngine('smarty3');
 
        $args = DI::args();