Merge pull request #7091 from nupplaphil/task/mod_rsd
Move mod/rsd_xml to src/Module/ReallySimpleDiscovery
This commit is contained in:
commit
c830e4b300
|
@ -1,26 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use Friendica\App;
|
|
||||||
use Friendica\Core\System;
|
|
||||||
|
|
||||||
function rsd_xml_content(App $a)
|
|
||||||
{
|
|
||||||
header ("Content-Type: text/xml");
|
|
||||||
echo '<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
|
|
||||||
<service>
|
|
||||||
<engineName>Friendica</engineName>
|
|
||||||
<engineLink>http://friendica.com/</engineLink>
|
|
||||||
<apis>
|
|
||||||
<api name="Twitter" preferred="true" apiLink="'.System::baseUrl().'/api/" blogID="">
|
|
||||||
<settings>
|
|
||||||
<docs>http://status.net/wiki/TwitterCompatibleAPI</docs>
|
|
||||||
<setting name="OAuth">false</setting>
|
|
||||||
</settings>
|
|
||||||
</api>
|
|
||||||
</apis>
|
|
||||||
</service>
|
|
||||||
</rsd>';
|
|
||||||
|
|
||||||
exit();
|
|
||||||
}
|
|
|
@ -164,6 +164,7 @@ class Router
|
||||||
$collector->addRoute(['GET'], '/{sub1}/{sub2}/{url}' , Module\Proxy::class);
|
$collector->addRoute(['GET'], '/{sub1}/{sub2}/{url}' , Module\Proxy::class);
|
||||||
});
|
});
|
||||||
$this->routeCollector->addRoute(['GET', 'POST'], '/register', Module\Register::class);
|
$this->routeCollector->addRoute(['GET', 'POST'], '/register', Module\Register::class);
|
||||||
|
$this->routeCollector->addRoute(['GET'], '/rsd.xml', Module\ReallySimpleDiscovery::class);
|
||||||
$this->routeCollector->addRoute(['GET'], '/statistics.json', Module\Statistics::class);
|
$this->routeCollector->addRoute(['GET'], '/statistics.json', Module\Statistics::class);
|
||||||
$this->routeCollector->addRoute(['GET'], '/tos', Module\Tos::class);
|
$this->routeCollector->addRoute(['GET'], '/tos', Module\Tos::class);
|
||||||
$this->routeCollector->addRoute(['GET'], '/webfinger', Module\WebFinger::class);
|
$this->routeCollector->addRoute(['GET'], '/webfinger', Module\WebFinger::class);
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Friendica\Module;
|
||||||
|
|
||||||
|
use Friendica\BaseModule;
|
||||||
|
use Friendica\Core\Renderer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prints the rsd.xml
|
||||||
|
* @see http://danielberlinger.github.io/rsd/
|
||||||
|
*/
|
||||||
|
class ReallySimpleDiscovery extends BaseModule
|
||||||
|
{
|
||||||
|
public static function rawContent()
|
||||||
|
{
|
||||||
|
header ('Content-Type: text/xml');
|
||||||
|
$tpl = Renderer::getMarkupTemplate('rsd.tpl');
|
||||||
|
echo Renderer::replaceMacros($tpl);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
|
||||||
|
<service>
|
||||||
|
<engineName>Friendica</engineName>
|
||||||
|
<engineLink>http://friendica.com/</engineLink>
|
||||||
|
<apis>
|
||||||
|
<api name="Twitter" preferred="true" apiLink="{{$baseurl}}/api/" blogID="">
|
||||||
|
<settings>
|
||||||
|
<docs>http://status.net/wiki/TwitterCompatibleAPI</docs>
|
||||||
|
<setting name="OAuth">false</setting>
|
||||||
|
</settings>
|
||||||
|
</api>
|
||||||
|
</apis>
|
||||||
|
</service>
|
||||||
|
</rsd>
|
Loading…
Reference in New Issue
Block a user