From 69b195848311a1e6a1a53780625a0d6329bae919 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 15 May 2024 06:15:50 +0000 Subject: [PATCH] Fix " Call to undefined method Friendica\App::getLoggedInUserNickname" --- src/Module/Calendar/Event/Get.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Module/Calendar/Event/Get.php b/src/Module/Calendar/Event/Get.php index 6b8f620663..8b76c927d4 100644 --- a/src/Module/Calendar/Event/Get.php +++ b/src/Module/Calendar/Event/Get.php @@ -22,14 +22,11 @@ namespace Friendica\Module\Calendar\Event; use Friendica\App; -use Friendica\Content\Feature; use Friendica\Core\L10n; use Friendica\Core\Session\Capability\IHandleUserSessions; -use Friendica\Core\System; use Friendica\Model\Event; use Friendica\Model\Item; use Friendica\Model\Post; -use Friendica\Model\User; use Friendica\Module\Response; use Friendica\Network\HTTPException; use Friendica\Util\DateTimeFormat; @@ -46,17 +43,16 @@ class Get extends \Friendica\BaseModule /** @var IHandleUserSessions */ protected $session; - public function __construct(App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, array $server, array $parameters = []) + public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->session = $session; - $this->app = $app; } protected function rawContent(array $request = []) { - $nickname = $this->parameters['nickname'] ?? $this->app->getLoggedInUserNickname(); + $nickname = $this->parameters['nickname'] ?? $this->session->getLocalUserNickname(); if (!$nickname) { throw new HTTPException\UnauthorizedException(); }