X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FReallySimpleDiscovery.php;h=515285dbfcd070b1ba2417b9021d73c55c1ad35d;hb=ce3b1210640ce653ef91cbf033788474c1f88b0c;hp=388a652aea2113b9f7017c1cde9f7eb47671c2e9;hpb=a1f332aaa527ae36ecc8cf2944f8b71e2317afea;p=friendica.git diff --git a/src/Module/ReallySimpleDiscovery.php b/src/Module/ReallySimpleDiscovery.php index 388a652aea..515285dbfc 100644 --- a/src/Module/ReallySimpleDiscovery.php +++ b/src/Module/ReallySimpleDiscovery.php @@ -3,7 +3,7 @@ namespace Friendica\Module; use Friendica\BaseModule; -use Friendica\Core\Renderer; +use Friendica\Util\XML; /** * Prints the rsd.xml @@ -13,9 +13,43 @@ class ReallySimpleDiscovery extends BaseModule { public static function rawContent() { - header ("Content-Type: text/xml"); - $tpl = Renderer::getMarkupTemplate('rsd.tpl'); - echo Renderer::replaceMacros($tpl, []); + header('Content-Type: text/xml'); + + $app = self::getApp(); + $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' => $app->getBaseURL(), + 'blogID' => '', + ], + 'settings' => [ + 'docs' => [ + 'http://status.net/wiki/TwitterCompatibleAPI', + ], + 'setting' => [ + '@attributes' => [ + 'name' => 'OAuth', + ], + 'false', + ], + ], + ] + ], + ], + ], + ], $xml); exit(); } }