Remove unused calls of DI::app()

This commit is contained in:
Art4 2024-11-21 10:12:27 +00:00
parent 4f1a4c4c8a
commit 702abb2830
5 changed files with 2 additions and 10 deletions

View file

@ -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()) ||

View file

@ -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.'));
}
}

View file

@ -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'];

View file

@ -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 = [];

View file

@ -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;