diff options
author | Evan Prodromou <evan@status.net> | 2010-09-07 16:39:43 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-09-07 16:39:43 -0400 |
commit | 338aa4bf1d36e11a354c67796509c6d1fec2aac2 (patch) | |
tree | a35ffae3e96197c488df531dc5c23a47aa5161c1 /lib/apiaction.php | |
parent | 5c98dfd58cabe2aa4b64e912f830cfbcd0fcecc1 (diff) | |
parent | 93e76f3b83c2eba4932d467e1693e9c5dd13b9ee (diff) |
Merge branch 'apinamespace' into 0.9.x
Diffstat (limited to 'lib/apiaction.php')
-rw-r--r-- | lib/apiaction.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/apiaction.php b/lib/apiaction.php index cc98b9b6e..5e0cd5518 100644 --- a/lib/apiaction.php +++ b/lib/apiaction.php @@ -301,7 +301,7 @@ class ApiAction extends Action // StatusNet-specific - $twitter_user['statusnet:profile_url'] = $profile->profileurl; + $twitter_user['statusnet_profile_url'] = $profile->profileurl; return $twitter_user; } @@ -406,7 +406,7 @@ class ApiAction extends Action // StatusNet-specific - $twitter_status['statusnet:html'] = $notice->rendered; + $twitter_status['statusnet_html'] = $notice->rendered; return $twitter_status; } @@ -618,7 +618,11 @@ class ApiAction extends Action $this->showTwitterXmlStatus($value, 'retweeted_status'); break; default: - $this->element($element, null, $value); + if (strncmp($element, 'statusnet_', 10) == 0) { + $this->element('statusnet:'.substr($element, 10), null, $value); + } else { + $this->element($element, null, $value); + } } } $this->elementEnd($tag); @@ -643,6 +647,8 @@ class ApiAction extends Action foreach($twitter_user as $element => $value) { if ($element == 'status') { $this->showTwitterXmlStatus($twitter_user['status']); + } else if (strncmp($element, 'statusnet_', 10) == 0) { + $this->element('statusnet:'.substr($element, 10), null, $value); } else { $this->element($element, null, $value); } |