diff options
Diffstat (limited to 'actions/xrds.php')
-rw-r--r-- | actions/xrds.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/actions/xrds.php b/actions/xrds.php index 1b10f9477..70a18a6b9 100644 --- a/actions/xrds.php +++ b/actions/xrds.php @@ -28,19 +28,19 @@ class XrdsAction extends Action { $nickname = $this->trimmed('nickname'); $user = User::staticGet('nickname', $nickname); if (!$user) { - common_user_error(_t('No such user.')); + common_user_error(_('No such user.')); return; } $this->show_xrds($user); } function show_xrds($user) { - + header('Content-Type: application/xrds+xml'); common_start_xml(); common_element_start('XRDS', array('xmlns' => 'xri://$xrds')); - + common_element_start('XRD', array('xmlns' => 'xri://$xrd*($v*2.0)', 'xml:id' => 'oauth', 'xmlns:simple' => 'http://xrds-simple.net/core/1.0', @@ -68,18 +68,18 @@ class XrdsAction extends Action { NULL, array(OAUTH_AUTH_HEADER, OAUTH_POST_BODY), array(OAUTH_HMAC_SHA1)); - + common_element_end('XRD'); - + # XXX: decide whether to include user's ID/nickname in postNotice URL - + common_element_start('XRD', array('xmlns' => 'xri://$xrd*($v*2.0)', 'xml:id' => 'omb', 'xmlns:simple' => 'http://xrds-simple.net/core/1.0', 'version' => '2.0')); - + common_element('Type', NULL, 'xri://$xrds*simple'); - + $this->show_service(OMB_ENDPOINT_POSTNOTICE, common_local_url('postnotice')); @@ -87,23 +87,23 @@ class XrdsAction extends Action { common_local_url('updateprofile')); common_element_end('XRD'); - + common_element_start('XRD', array('xmlns' => 'xri://$xrd*($v*2.0)', 'version' => '2.0')); common_element('Type', NULL, 'xri://$xrds*simple'); - + $this->show_service(OAUTH_DISCOVERY, '#oauth'); $this->show_service(OMB_NAMESPACE, '#omb'); - + common_element_end('XRD'); - + common_element_end('XRDS'); common_end_xml(); } - + function show_service($type, $uri, $params=NULL, $sigs=NULL, $localId=NULL) { common_element_start('Service'); if ($uri) { |