mirror of
https://github.com/friendica/friendica
synced 2025-01-05 18:04:43 +00:00
Merge pull request #14161 from annando/error
Fix " Call to undefined method Friendica\App::getLoggedInUserNickname"
This commit is contained in:
commit
cad3a01b1c
1 changed files with 2 additions and 6 deletions
|
@ -22,14 +22,11 @@
|
||||||
namespace Friendica\Module\Calendar\Event;
|
namespace Friendica\Module\Calendar\Event;
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Content\Feature;
|
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Session\Capability\IHandleUserSessions;
|
use Friendica\Core\Session\Capability\IHandleUserSessions;
|
||||||
use Friendica\Core\System;
|
|
||||||
use Friendica\Model\Event;
|
use Friendica\Model\Event;
|
||||||
use Friendica\Model\Item;
|
use Friendica\Model\Item;
|
||||||
use Friendica\Model\Post;
|
use Friendica\Model\Post;
|
||||||
use Friendica\Model\User;
|
|
||||||
use Friendica\Module\Response;
|
use Friendica\Module\Response;
|
||||||
use Friendica\Network\HTTPException;
|
use Friendica\Network\HTTPException;
|
||||||
use Friendica\Util\DateTimeFormat;
|
use Friendica\Util\DateTimeFormat;
|
||||||
|
@ -46,17 +43,16 @@ class Get extends \Friendica\BaseModule
|
||||||
/** @var IHandleUserSessions */
|
/** @var IHandleUserSessions */
|
||||||
protected $session;
|
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);
|
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||||
|
|
||||||
$this->session = $session;
|
$this->session = $session;
|
||||||
$this->app = $app;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function rawContent(array $request = [])
|
protected function rawContent(array $request = [])
|
||||||
{
|
{
|
||||||
$nickname = $this->parameters['nickname'] ?? $this->app->getLoggedInUserNickname();
|
$nickname = $this->parameters['nickname'] ?? $this->session->getLocalUserNickname();
|
||||||
if (!$nickname) {
|
if (!$nickname) {
|
||||||
throw new HTTPException\UnauthorizedException();
|
throw new HTTPException\UnauthorizedException();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue