X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FApp.php;h=db3e644c2fc4391a6716c3cfb184b8b6fe29d694;hb=e231907b3c00223909bfbef19998a42d3e198a4a;hp=a48e21571d85f86a8dd0c0bf9bb675fb56053716;hpb=6e2ab6c3af5f6f0d7c4b24afd7988082b38c6127;p=friendica.git diff --git a/src/App.php b/src/App.php index a48e21571d..db3e644c2f 100644 --- a/src/App.php +++ b/src/App.php @@ -706,11 +706,13 @@ class App $timestamp = microtime(true); $response = $module->run($httpException, $input); $this->profiler->set(microtime(true) - $timestamp, 'content'); + + // Wrapping HTML responses in the theme template if ($response->getHeaderLine(ICanCreateResponses::X_HEADER) === ICanCreateResponses::TYPE_HTML) { - $page->run($this, $this->baseURL, $this->args, $this->mode, $response, $this->l10n, $this->profiler, $this->config, $pconfig, $nav, $this->session->getLocalUserId()); - } else { - $page->exit($response); + $response = $page->run($this, $this->baseURL, $this->args, $this->mode, $response, $this->l10n, $this->profiler, $this->config, $pconfig, $nav, $this->session->getLocalUserId()); } + + $page->exit($response); } catch (HTTPException $e) { $httpException->rawContent($e); }