X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FApp%2FPage.php;h=0d7b1643635cff55cab6248a8ff96c464f245fb8;hb=7bea941f3c03e77d5e59275fbf46272e3a37b1d8;hp=1b499f614c064b9373579b6c11399f7c3af3a968;hpb=7cd85873ee321263ff9b4e77fc121dca1c9dae6f;p=friendica.git diff --git a/src/App/Page.php b/src/App/Page.php index 1b499f614c..0d7b164363 100644 --- a/src/App/Page.php +++ b/src/App/Page.php @@ -1,6 +1,6 @@ getProtocolVersion(), + $response->getStatusCode(), + $response->getReasonPhrase()) + ); + foreach ($response->getHeaders() as $key => $header) { if (is_array($header)) { $header_str = implode(',', $header); + } else { + $header_str = $header; } + if (empty($key)) { header($header_str); } else { @@ -417,7 +426,6 @@ class Page implements ArrayAccess */ $timestamp = microtime(true); $this->initContent($response, $mode); - $profiler->set(microtime(true) - $timestamp, 'content'); // Load current theme info after module has been initialized as theme could have been set in module $currentTheme = $app->getCurrentTheme(); @@ -445,6 +453,8 @@ class Page implements ArrayAccess */ $this->initFooter($app, $mode, $l10n); + $profiler->set(microtime(true) - $timestamp, 'aftermath'); + if (!$mode->isAjax()) { Hook::callAll('page_end', $this->page['content']); } @@ -456,10 +466,16 @@ class Page implements ArrayAccess } foreach ($response->getHeaders() as $key => $header) { + if (is_array($header)) { + $header_str = implode(',', $header); + } else { + $header_str = $header; + } + if (empty($key)) { - header($header); + header($header_str); } else { - header("$key: $header"); + header("$key: $header_str"); } }