diff options
-rw-r--r-- | actions/hostmeta.php | 5 | ||||
-rw-r--r-- | lib/router.php | 2 | ||||
-rw-r--r-- | plugins/OStatus/OStatusPlugin.php | 10 |
3 files changed, 7 insertions, 10 deletions
diff --git a/actions/hostmeta.php b/actions/hostmeta.php index b7beee5a8..2587bb6b9 100644 --- a/actions/hostmeta.php +++ b/actions/hostmeta.php @@ -51,6 +51,11 @@ class HostMetaAction extends Action $xrd->host = $domain; if(Event::handle('StartHostMetaLinks', array(&$xrd->links))) { + $url = common_local_url('userxrd'); + $url.= '?uri={uri}'; + $xrd->links[] = array('rel' => Discovery::LRDD_REL, + 'template' => $url, + 'title' => array('Resource Descriptor')); Event::handle('EndHostMetaLinks', array(&$xrd->links)); } diff --git a/lib/router.php b/lib/router.php index 6912bd7cf..47357ca08 100644 --- a/lib/router.php +++ b/lib/router.php @@ -151,6 +151,8 @@ class Router array('action' => 'publicxrds')); $m->connect('.well-known/host-meta', array('action' => 'hostmeta')); + $m->connect('main/xrd', + array('action' => 'userxrd')); // these take a code diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index 8aedebe41..7d62eaba6 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -52,8 +52,6 @@ class OStatusPlugin extends Plugin function onRouterInitialized($m) { // Discovery actions - $m->connect('main/xrd', - array('action' => 'userxrd')); $m->connect('main/ownerxrd', array('action' => 'ownerxrd')); $m->connect('main/ostatus', @@ -1010,14 +1008,6 @@ class OStatusPlugin extends Plugin return true; } - function onStartHostMetaLinks(&$links) { - $url = common_local_url('userxrd'); - $url.= '?uri={uri}'; - $links[] = array('rel' => Discovery::LRDD_REL, - 'template' => $url, - 'title' => array('Resource Descriptor')); - } - function onEndXrdActionLinks(&$xrd, $user) { // Salmon |