friendica/mod/opensearch.php
2019-01-21 09:49:17 -05:00

21 lines
380 B
PHP

<?php
use Friendica\App;
use Friendica\Core\Renderer;
use Friendica\Core\System;
function opensearch_content(App $a) {
$tpl = Renderer::getMarkupTemplate('opensearch.tpl');
header("Content-type: application/opensearchdescription+xml");
$o = Renderer::replaceMacros($tpl, [
'$baseurl' => System::baseUrl(),
'$nodename' => $a->getHostName(),
]);
echo $o;
exit();
}