From: Brion Vibber Date: Fri, 18 Jun 2010 16:59:11 +0000 (-0700) Subject: Catch a couple of missing XML namespace declarations on API XML output. Missing NS... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9d890e2be07364487cb3b333b49650b820dd7176;p=quix0rs-gnu-social.git Catch a couple of missing XML namespace declarations on API XML output. Missing NS declarations were breaking XML parsing for some clients since beaecb18d5b92b913473dfffd545dc436f50cf66 --- diff --git a/actions/apiaccountverifycredentials.php b/actions/apiaccountverifycredentials.php index ea61a32059..79416e9b26 100644 --- a/actions/apiaccountverifycredentials.php +++ b/actions/apiaccountverifycredentials.php @@ -75,7 +75,7 @@ class ApiAccountVerifyCredentialsAction extends ApiAuthAction if ($this->format == 'xml') { $this->initDocument('xml'); - $this->showTwitterXmlUser($twitter_user); + $this->showTwitterXmlUser($twitter_user, 'user', true); $this->endDocument('xml'); } elseif ($this->format == 'json') { $this->initDocument('json'); diff --git a/actions/apisubscriptions.php b/actions/apisubscriptions.php index 0ba324057e..63d65f2893 100644 --- a/actions/apisubscriptions.php +++ b/actions/apisubscriptions.php @@ -206,7 +206,8 @@ class ApiSubscriptionsAction extends ApiBareAuthAction { switch ($this->format) { case 'xml': - $this->elementStart('users', array('type' => 'array')); + $this->elementStart('users', array('type' => 'array', + 'xmlns:statusnet' => 'http://status.net/schema/api/1/')); foreach ($this->profiles as $profile) { $this->showProfile( $profile,