Make userxrd part of the default hostmeta
This commit is contained in:
parent
0a4911552e
commit
fcc0825b14
|
@ -51,6 +51,11 @@ class HostMetaAction extends Action
|
||||||
$xrd->host = $domain;
|
$xrd->host = $domain;
|
||||||
|
|
||||||
if(Event::handle('StartHostMetaLinks', array(&$xrd->links))) {
|
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));
|
Event::handle('EndHostMetaLinks', array(&$xrd->links));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -151,6 +151,8 @@ class Router
|
||||||
array('action' => 'publicxrds'));
|
array('action' => 'publicxrds'));
|
||||||
$m->connect('.well-known/host-meta',
|
$m->connect('.well-known/host-meta',
|
||||||
array('action' => 'hostmeta'));
|
array('action' => 'hostmeta'));
|
||||||
|
$m->connect('main/xrd',
|
||||||
|
array('action' => 'userxrd'));
|
||||||
|
|
||||||
// these take a code
|
// these take a code
|
||||||
|
|
||||||
|
|
|
@ -52,8 +52,6 @@ class OStatusPlugin extends Plugin
|
||||||
function onRouterInitialized($m)
|
function onRouterInitialized($m)
|
||||||
{
|
{
|
||||||
// Discovery actions
|
// Discovery actions
|
||||||
$m->connect('main/xrd',
|
|
||||||
array('action' => 'userxrd'));
|
|
||||||
$m->connect('main/ownerxrd',
|
$m->connect('main/ownerxrd',
|
||||||
array('action' => 'ownerxrd'));
|
array('action' => 'ownerxrd'));
|
||||||
$m->connect('main/ostatus',
|
$m->connect('main/ostatus',
|
||||||
|
@ -1010,14 +1008,6 @@ class OStatusPlugin extends Plugin
|
||||||
return true;
|
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)
|
function onEndXrdActionLinks(&$xrd, $user)
|
||||||
{
|
{
|
||||||
// Salmon
|
// Salmon
|
||||||
|
|
Loading…
Reference in New Issue
Block a user