Fix start/stop xml in xrds

This commit is contained in:
Evan Prodromou 2009-01-23 01:39:25 +01:00
parent 8228dc7ed5
commit 120ed87e72

View File

@ -49,17 +49,17 @@ class XrdsAction extends Action
{ {
/** /**
* Is read only? * Is read only?
* *
* @return boolean true * @return boolean true
*/ */
function isReadOnly() function isReadOnly()
{ {
return true; return true;
} }
/** /**
* Class handler. * Class handler.
* *
* @param array $args query arguments * @param array $args query arguments
* *
* @return void * @return void
@ -78,7 +78,7 @@ class XrdsAction extends Action
/** /**
* Show XRDS for a user. * Show XRDS for a user.
* *
* @param class $user XRDS for this user. * @param class $user XRDS for this user.
* *
* @return void * @return void
@ -86,7 +86,7 @@ class XrdsAction extends Action
function showXrds($user) function showXrds($user)
{ {
header('Content-Type: application/xrds+xml'); header('Content-Type: application/xrds+xml');
common_start_xml(); $this->startXML();
$this->elementStart('XRDS', array('xmlns' => 'xri://$xrds')); $this->elementStart('XRDS', array('xmlns' => 'xri://$xrds'));
$this->elementStart('XRD', array('xmlns' => 'xri://$xrd*($v*2.0)', $this->elementStart('XRD', array('xmlns' => 'xri://$xrd*($v*2.0)',
@ -133,12 +133,12 @@ class XrdsAction extends Action
'#omb'); '#omb');
$this->elementEnd('XRD'); $this->elementEnd('XRD');
$this->elementEnd('XRDS'); $this->elementEnd('XRDS');
common_end_xml(); $this->endXML();
} }
/** /**
* Show service. * Show service.
* *
* @param string $type XRDS type * @param string $type XRDS type
* @param string $uri URI * @param string $uri URI
* @param array $params type parameters, null by default * @param array $params type parameters, null by default