aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-04-21 20:14:55 -0700
committerredmatrix <git@macgirvin.com>2016-04-21 20:14:55 -0700
commit5a427dcee3ca9bce3fcb5de6a67292a405ee6736 (patch)
tree053e94e5898d00b66d500716dea56457da88a027
parent7d45f63b78649af1c7b523f40f0b798d4e4db9e4 (diff)
downloadvolse-hubzilla-5a427dcee3ca9bce3fcb5de6a67292a405ee6736.tar.gz
volse-hubzilla-5a427dcee3ca9bce3fcb5de6a67292a405ee6736.tar.bz2
volse-hubzilla-5a427dcee3ca9bce3fcb5de6a67292a405ee6736.zip
No idea how long RSD (Really Simple Discovery) has been broken. I had no idea it was even here.
-rw-r--r--Zotlabs/Module/Rsd_xml.php30
-rwxr-xr-xview/tpl/head.tpl1
-rw-r--r--view/tpl/rsd.tpl15
3 files changed, 25 insertions, 21 deletions
diff --git a/Zotlabs/Module/Rsd_xml.php b/Zotlabs/Module/Rsd_xml.php
index 114ecc49b..06af39ad1 100644
--- a/Zotlabs/Module/Rsd_xml.php
+++ b/Zotlabs/Module/Rsd_xml.php
@@ -1,29 +1,17 @@
<?php
namespace Zotlabs\Module;
-// What do we need this for?
-
-
class Rsd_xml extends \Zotlabs\Web\Controller {
- function get() {
+ function init() {
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>Red</engineName>
- <engineLink>http://friendica.com/</engineLink>
- <apis>
- <api name="Twitter" preferred="true" apiLink="'.z_root().'/api/" blogID="">
- <settings>
- <docs>http://status.net/wiki/TwitterCompatibleAPI</docs>
- <setting name="OAuth">false</setting>
- </settings>
- </api>
- </apis>
- </service>
- </rsd>
- ';
- die();
+ echo replace_macros(get_markup_template('rsd.tpl'),array(
+ '$project' => \Zotlabs\Project\System::get_platform_name(),
+ '$baseurl' => z_root(),
+ '$apipath' => z_root() . '/api/'
+ ));
+ killme();
}
+
}
+
diff --git a/view/tpl/head.tpl b/view/tpl/head.tpl
index 9fcdf1735..9502dd91c 100755
--- a/view/tpl/head.tpl
+++ b/view/tpl/head.tpl
@@ -11,6 +11,7 @@
{{$head_js}}
<link rel="shortcut icon" href="{{$icon}}" />
<link rel="search" href="{{$baseurl}}/opensearch" type="application/opensearchdescription+xml" title="{{$osearch}}" />
+<link rel="EditURI" type="application/rsd+xml" href="{{$baseurl}}/rsd.xml" />
<script>
var updateInterval = {{$update_interval}};
var localUser = {{if $local_channel}}{{$local_channel}}{{else}}false{{/if}};
diff --git a/view/tpl/rsd.tpl b/view/tpl/rsd.tpl
new file mode 100644
index 000000000..9fd02c472
--- /dev/null
+++ b/view/tpl/rsd.tpl
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
+ <service>
+ <engineName>{{$project}}</engineName>
+ <engineLink>{{$baseurl}}</engineLink>
+ <apis>
+ <api name="Twitter" preferred="true" apiLink="{{$apipath}}" blogID="">
+ <settings>
+ <docs>http://status.net/wiki/TwitterCompatibleAPI</docs>
+ <setting name="OAuth">true</setting>
+ </settings>
+ </api>
+ </apis>
+ </service>
+</rsd> \ No newline at end of file