diff --git a/index.php b/index.php index 66b5f224ad..f936cd1a3a 100644 --- a/index.php +++ b/index.php @@ -29,16 +29,4 @@ $dice = $dice->addRule(Friendica\App\Mode::class, ['call' => [['determineRunMode $a = \Friendica\App::fromDice($dice); -$a->processRequest(); - -$a->runFrontend( - $dice->create(\Friendica\App\Router::class), - $dice->create(\Friendica\Core\PConfig\Capability\IManagePersonalConfigValues::class), - $dice->create(\Friendica\Security\Authentication::class), - $dice->create(\Friendica\App\Page::class), - $dice->create(\Friendica\Content\Nav::class), - $dice->create(Friendica\Module\Special\HTTPException::class), - new \Friendica\Util\HTTPInputData($request->getServerParams()), - $start_time, - $request->getServerParams() -); +$a->processRequest($request, $start_time); diff --git a/src/App.php b/src/App.php index b151f78b39..cfd6e52cf2 100644 --- a/src/App.php +++ b/src/App.php @@ -34,6 +34,7 @@ use Friendica\Util\DateTimeFormat; use Friendica\Util\HTTPInputData; use Friendica\Util\HTTPSignature; use Friendica\Util\Profiler; +use Psr\Http\Message\ServerRequestInterface; use Psr\Log\LoggerInterface; /** @@ -154,7 +155,7 @@ class App $this->appHelper = $appHelper; } - public function processRequest(): void + public function processRequest(ServerRequestInterface $request, float $start_time): void { $this->load( $this->container->create(DbaDefinition::class), @@ -162,6 +163,18 @@ class App ); $this->mode->setExecutor(Mode::INDEX); + + $this->runFrontend( + $this->container->create(\Friendica\App\Router::class), + $this->container->create(\Friendica\Core\PConfig\Capability\IManagePersonalConfigValues::class), + $this->container->create(\Friendica\Security\Authentication::class), + $this->container->create(\Friendica\App\Page::class), + $this->container->create(\Friendica\Content\Nav::class), + $this->container->create(\Friendica\Module\Special\HTTPException::class), + new \Friendica\Util\HTTPInputData($request->getServerParams()), + $start_time, + $request->getServerParams() + ); } /**