From 702abb28302151d65fbf7d4d71f202a1cc59876b Mon Sep 17 00:00:00 2001 From: Art4 Date: Thu, 21 Nov 2024 10:12:27 +0000 Subject: [PATCH] Remove unused calls of DI::app() --- src/Module/Directory.php | 1 - src/Module/Invite.php | 4 +--- src/Module/NoScrape.php | 2 -- src/Module/Profile/Schedule.php | 2 -- src/Object/Post.php | 3 +-- 5 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/Module/Directory.php b/src/Module/Directory.php index d173be6d96..ad95b49524 100644 --- a/src/Module/Directory.php +++ b/src/Module/Directory.php @@ -27,7 +27,6 @@ class Directory extends BaseModule { protected function content(array $request = []): string { - $app = DI::app(); $config = DI::config(); if (($config->get('system', 'block_public') && !DI::userSession()->isAuthenticated()) || diff --git a/src/Module/Invite.php b/src/Module/Invite.php index 92b777b641..bb8f94c9a5 100644 --- a/src/Module/Invite.php +++ b/src/Module/Invite.php @@ -30,7 +30,6 @@ class Invite extends BaseModule self::checkFormSecurityTokenRedirectOnError('/', 'send_invite'); - $app = DI::app(); $config = DI::config(); $max_invites = intval($config->get('system', 'max_invites')); @@ -117,7 +116,6 @@ class Invite extends BaseModule throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.')); } - $app = DI::app(); $config = DI::config(); $inviteOnly = false; @@ -142,7 +140,7 @@ class Invite extends BaseModule if (Register::getPolicy() === Register::CLOSED) { return DI::l10n()->t('Our apologies. This system is not currently configured to connect with other public sites or invite members.'); } else { - $linkTxt = DI::l10n()->t('To accept this invitation, please visit and register at %s.', DI::baseUrl() . '/register' + $linkTxt = DI::l10n()->t('To accept this invitation, please visit and register at %s.', DI::baseUrl() . '/register' . "\r\n" . "\r\n" . DI::l10n()->t('Friendica sites all inter-connect to create a huge privacy-enhanced social web that is owned and controlled by its members. They can also connect with many traditional social networks.')); } } diff --git a/src/Module/NoScrape.php b/src/Module/NoScrape.php index 9ea239e0ea..71a48e6f04 100644 --- a/src/Module/NoScrape.php +++ b/src/Module/NoScrape.php @@ -22,8 +22,6 @@ class NoScrape extends BaseModule { protected function rawContent(array $request = []) { - $a = DI::app(); - if (isset($this->parameters['nick'])) { // Get infos about a specific nick (public) $which = $this->parameters['nick']; diff --git a/src/Module/Profile/Schedule.php b/src/Module/Profile/Schedule.php index ae64d695c9..212c02b78a 100644 --- a/src/Module/Profile/Schedule.php +++ b/src/Module/Profile/Schedule.php @@ -42,8 +42,6 @@ class Schedule extends BaseProfile throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.')); } - $a = DI::app(); - $o = self::getTabsHTML('schedule', true, DI::userSession()->getLocalUserNickname(), false); $schedule = []; diff --git a/src/Object/Post.php b/src/Object/Post.php index 450af95c84..ead75ef60b 100644 --- a/src/Object/Post.php +++ b/src/Object/Post.php @@ -726,7 +726,7 @@ class Post $title = DI::l10n()->t('Commented by: %s', $actors); $icon = ['fa' => 'fa-commenting', 'icon' => 'icon-commenting']; break; - + default: $title = DI::l10n()->t('Reacted with %s by: %s', $element['emoji'], $actors); $icon = []; @@ -1180,7 +1180,6 @@ class Post */ protected function checkWallToWall() { - $a = DI::app(); $conv = $this->getThread(); $this->wall_to_wall = false;