From: Hypolite Petovan Date: Wed, 30 Nov 2022 17:03:42 +0000 (-0500) Subject: Remove unused theme info value "events_in_profile" X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0d53c6961033bb90d3892a87603c7c2bc6d25af0;p=friendica.git Remove unused theme info value "events_in_profile" All public events (event if they are ownded by other users) are visible --- diff --git a/src/App.php b/src/App.php index abad4ee35d..623a5b63a2 100644 --- a/src/App.php +++ b/src/App.php @@ -69,7 +69,6 @@ class App private $theme_info = [ 'videowidth' => 425, 'videoheight' => 350, - 'events_in_profile' => true ]; private $user_id = 0; diff --git a/src/Module/BaseProfile.php b/src/Module/BaseProfile.php index 56577ef33a..10384e1578 100644 --- a/src/Module/BaseProfile.php +++ b/src/Module/BaseProfile.php @@ -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, diff --git a/src/Module/Calendar/Show.php b/src/Module/Calendar/Show.php index 9bcc004fd1..9c5c9c4526 100644 --- a/src/Module/Calendar/Show.php +++ b/src/Module/Calendar/Show.php @@ -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 { diff --git a/view/theme/frio/theme.php b/view/theme/frio/theme.php index c504678577..c8f22228b6 100644 --- a/view/theme/frio/theme.php +++ b/view/theme/frio/theme.php @@ -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'); diff --git a/view/theme/vier/theme.php b/view/theme/vier/theme.php index 062e4a105c..65612623d2 100644 --- a/view/theme/vier/theme.php +++ b/view/theme/vier/theme.php @@ -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();