diff options
author | Evan Prodromou <evan@status.net> | 2010-04-24 12:14:12 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-04-24 12:14:12 -0400 |
commit | 93e76f3b83c2eba4932d467e1693e9c5dd13b9ee (patch) | |
tree | 1c12a128f2b6f983fe4e0fd4dd31e8e0fab9e954 | |
parent | beaecb18d5b92b913473dfffd545dc436f50cf66 (diff) |
use statusnet_ as namespace prefix for JSON
-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 6ee0a94d9..bb4884b45 100644 --- a/lib/apiaction.php +++ b/lib/apiaction.php @@ -225,7 +225,7 @@ class ApiAction extends Action // StatusNet-specific - $twitter_user['statusnet:profile_url'] = $profile->profileurl; + $twitter_user['statusnet_profile_url'] = $profile->profileurl; return $twitter_user; } @@ -314,7 +314,7 @@ class ApiAction extends Action // StatusNet-specific - $twitter_status['statusnet:html'] = $notice->rendered; + $twitter_status['statusnet_html'] = $notice->rendered; return $twitter_status; } @@ -508,7 +508,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); @@ -533,6 +537,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); } |