]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Make userxrd part of the default hostmeta
authorEvan Prodromou <evan@status.net>
Sat, 27 Nov 2010 02:46:51 +0000 (21:46 -0500)
committerEvan Prodromou <evan@status.net>
Sat, 27 Nov 2010 02:46:51 +0000 (21:46 -0500)
actions/hostmeta.php
lib/router.php
plugins/OStatus/OStatusPlugin.php

index b7beee5a86d75faff99031962d079ff63a484dab..2587bb6b91977711d6bea22c09eaff45ffcae043 100644 (file)
@@ -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));
         }
 
index 6912bd7cf8595277ce162dc317036b1d162a185c..47357ca0856282e516724d12ab9885b5c0fcc8de 100644 (file)
@@ -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
 
index 8aedebe412cad64b97884f8da8e3e7bc63bc43b2..7d62eaba6d1e27eb167a6b40ccc351e8e8060eb1 100644 (file)
@@ -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