summaryrefslogtreecommitdiff
path: root/lib/api.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-12-14 17:11:34 -0500
committerEvan Prodromou <evan@status.net>2009-12-14 17:11:34 -0500
commitd22364b35e33982b2f95146f9ac290a3606da28b (patch)
treee180d3d5486966aaf1dc7263f77e469184eff5dd /lib/api.php
parentdf7fc2710c4f070f7fb3fe961dca810a933bc9a7 (diff)
had the order of <status> and <retweeted_status> wrong in api output
Diffstat (limited to 'lib/api.php')
-rw-r--r--lib/api.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/api.php b/lib/api.php
index 833bc1c5f..4ed49e452 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -220,18 +220,15 @@ class ApiAction extends Action
{
$base = $this->twitterSimpleStatusArray($notice, $include_user);
- if (empty($notice->repeat_of)) {
- return $base;
- } else {
+ if (!empty($notice->repeat_of)) {
$original = Notice::staticGet('id', $notice->repeat_of);
- if (empty($original)) {
- return $base;
- } else {
+ if (!empty($original)) {
$original_array = $this->twitterSimpleStatusArray($original, $include_user);
- $original_array['retweeted_status'] = $base;
- return $original_array;
+ $base['retweeted_status'] = $original_array;
}
}
+
+ return $base;
}
function twitterSimpleStatusArray($notice, $include_user=true)