summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-12-07 15:53:34 -0500
committerEvan Prodromou <evan@status.net>2010-12-07 15:53:34 -0500
commit57859a4bc89c154734f3771fdd3aed1e8ced688b (patch)
tree2ca799076ec6abd884dab79be2633adda34c0538 /lib
parenteab8d752e8d74a5b95ab61cdddac1061a6dd9a26 (diff)
generate links for apinamespace.org/atom and /twitter in userxrd
Diffstat (limited to 'lib')
-rw-r--r--lib/xrdaction.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/xrdaction.php b/lib/xrdaction.php
index 177d1b471..4377eab94 100644
--- a/lib/xrdaction.php
+++ b/lib/xrdaction.php
@@ -97,10 +97,23 @@ class XrdAction extends Action
'href' => common_local_url('foaf',
array('nickname' => $nick)));
+ $xrd->links[] = array('rel' => 'http://apinamespace.org/atom',
+ 'type' => 'application/atomsvc+xml',
+ 'href' => common_local_url('ApiAtomService', array('id' => $nick)));
+
+ if (common_config('site', 'fancy')) {
+ $apiRoot = common_path('api/', true);
+ } else {
+ $apiRoot = common_path('index.php/api/', true);
+ }
+
+ $xrd->links[] = array('rel' => 'http://apinamespace.org/twitter',
+ 'href' => $apiRoot,
+ 'property' => array(array('type' => 'http://apinamespace.org/twitter/username',
+ 'value' => $nick)));
Event::handle('EndXrdActionLinks', array(&$xrd, $this->user));
}
-
header('Content-type: application/xrd+xml');
print $xrd->toXML();