mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 04:45:16 +02:00
Unified output via the "httpExit" function
This commit is contained in:
parent
d15023fe4b
commit
4a22034be6
16 changed files with 69 additions and 70 deletions
|
@ -28,6 +28,7 @@ use Friendica\Core\Renderer;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Response;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\XML;
|
||||
|
||||
|
@ -229,9 +230,7 @@ function poco_init(App $a) {
|
|||
Logger::info("End of poco");
|
||||
|
||||
if ($format === 'xml') {
|
||||
header('Content-type: text/xml');
|
||||
echo Renderer::replaceMacros(Renderer::getMarkupTemplate('poco_xml.tpl'), XML::arrayEscape(['$response' => $ret]));
|
||||
exit();
|
||||
System::httpExit(Renderer::replaceMacros(Renderer::getMarkupTemplate('poco_xml.tpl'), XML::arrayEscape(['$response' => $ret])), Response::TYPE_XML);
|
||||
}
|
||||
if ($format === 'json') {
|
||||
System::jsonExit($ret);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue