From eaa81d25fa7bd954132ce7f901fae69b0d46ec1a Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 15 Jan 2009 22:57:15 +0000 Subject: Convert all actions to use new UI functions I did a massive search-and-replace to get all the action subclasses to use the new output function (common_element() -> $this->element(), etc.) There's still a lot to do, but it's a first step --- actions/xrds.php | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'actions/xrds.php') diff --git a/actions/xrds.php b/actions/xrds.php index 7edc6aa39..9c51f1dd2 100644 --- a/actions/xrds.php +++ b/actions/xrds.php @@ -47,14 +47,14 @@ class XrdsAction extends Action header('Content-Type: application/xrds+xml'); common_start_xml(); - common_element_start('XRDS', array('xmlns' => 'xri://$xrds')); + $this->elementStart('XRDS', array('xmlns' => 'xri://$xrds')); - common_element_start('XRD', array('xmlns' => 'xri://$xrd*($v*2.0)', + $this->elementStart('XRD', array('xmlns' => 'xri://$xrd*($v*2.0)', 'xml:id' => 'oauth', 'xmlns:simple' => 'http://xrds-simple.net/core/1.0', 'version' => '2.0')); - common_element('Type', null, 'xri://$xrds*simple'); + $this->element('Type', null, 'xri://$xrds*simple'); $this->show_service(OAUTH_ENDPOINT_REQUEST, common_local_url('requesttoken'), @@ -77,16 +77,16 @@ class XrdsAction extends Action array(OAUTH_AUTH_HEADER, OAUTH_POST_BODY), array(OAUTH_HMAC_SHA1)); - common_element_end('XRD'); + $this->elementEnd('XRD'); # XXX: decide whether to include user's ID/nickname in postNotice URL - common_element_start('XRD', array('xmlns' => 'xri://$xrd*($v*2.0)', + $this->elementStart('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->element('Type', null, 'xri://$xrds*simple'); $this->show_service(OMB_ENDPOINT_POSTNOTICE, common_local_url('postnotice')); @@ -94,44 +94,44 @@ class XrdsAction extends Action $this->show_service(OMB_ENDPOINT_UPDATEPROFILE, common_local_url('updateprofile')); - common_element_end('XRD'); + $this->elementEnd('XRD'); - common_element_start('XRD', array('xmlns' => 'xri://$xrd*($v*2.0)', + $this->elementStart('XRD', array('xmlns' => 'xri://$xrd*($v*2.0)', 'version' => '2.0')); - common_element('Type', null, 'xri://$xrds*simple'); + $this->element('Type', null, 'xri://$xrds*simple'); $this->show_service(OAUTH_DISCOVERY, '#oauth'); $this->show_service(OMB_NAMESPACE, '#omb'); - common_element_end('XRD'); + $this->elementEnd('XRD'); - common_element_end('XRDS'); + $this->elementEnd('XRDS'); common_end_xml(); } function show_service($type, $uri, $params=null, $sigs=null, $localId=null) { - common_element_start('Service'); + $this->elementStart('Service'); if ($uri) { - common_element('URI', null, $uri); + $this->element('URI', null, $uri); } - common_element('Type', null, $type); + $this->element('Type', null, $type); if ($params) { foreach ($params as $param) { - common_element('Type', null, $param); + $this->element('Type', null, $param); } } if ($sigs) { foreach ($sigs as $sig) { - common_element('Type', null, $sig); + $this->element('Type', null, $sig); } } if ($localId) { - common_element('LocalID', null, $localId); + $this->element('LocalID', null, $localId); } - common_element_end('Service'); + $this->elementEnd('Service'); } } \ No newline at end of file -- cgit v1.2.3-54-g00ecf