X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FReallySimpleDiscovery.php;h=8d6a6ff3c282bed97127812cacf9dcecdadb52c0;hb=53e38b03130ea798bba44db44ccb7f331dc4b91d;hp=4c14d3c8373aadf28dcd7654b19574b709185124;hpb=8af0ae171e7a3f9f47441043cec17db66b2088e5;p=friendica.git diff --git a/src/Module/ReallySimpleDiscovery.php b/src/Module/ReallySimpleDiscovery.php index 4c14d3c837..8d6a6ff3c2 100644 --- a/src/Module/ReallySimpleDiscovery.php +++ b/src/Module/ReallySimpleDiscovery.php @@ -1,9 +1,29 @@ . + * + */ namespace Friendica\Module; use Friendica\BaseModule; -use Friendica\Core\Renderer; +use Friendica\DI; +use Friendica\Util\XML; /** * Prints the rsd.xml @@ -11,11 +31,44 @@ use Friendica\Core\Renderer; */ class ReallySimpleDiscovery extends BaseModule { - public static function rawContent() + public static function rawContent(array $parameters = []) { - header ('Content-Type: text/xml'); - $tpl = Renderer::getMarkupTemplate('rsd.tpl'); - echo Renderer::replaceMacros($tpl); + header('Content-Type: text/xml'); + + $xml = null; + echo XML::fromArray([ + 'rsd' => [ + '@attributes' => [ + 'version' => '1.0', + 'xmlns' => 'http://archipelago.phrasewise.com/rsd', + ], + 'service' => [ + 'engineName' => 'Friendica', + 'engineLink' => 'http://friendica.com', + 'apis' => [ + 'api' => [ + '@attributes' => [ + 'name' => 'Twitter', + 'preferred' => 'true', + 'apiLink' => DI::baseUrl()->get(), + 'blogID' => '', + ], + 'settings' => [ + 'docs' => [ + 'http://status.net/wiki/TwitterCompatibleAPI', + ], + 'setting' => [ + '@attributes' => [ + 'name' => 'OAuth', + ], + 'false', + ], + ], + ] + ], + ], + ], + ], $xml); exit(); } }