Merge pull request #7097 from nupplaphil/task/mod_after_PR_fixing

Fixings for Mod-Refactorings
This commit is contained in:
Hypolite Petovan 2019-05-05 20:28:57 -04:00 committed by GitHub
commit bb8d297ae4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 111 additions and 52 deletions

View file

@ -12,7 +12,7 @@ use Friendica\Util\Strings;
* Creates a bookmarklet
* Shows either a editor browser or adds the given bookmarklet to the current user
*/
class BookMarklet extends BaseModule
class Bookmarklet extends BaseModule
{
public static function content()
{

View file

@ -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();
}
}