summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/api.php10
-rw-r--r--lib/router.php5
2 files changed, 10 insertions, 5 deletions
diff --git a/lib/api.php b/lib/api.php
index 0c6650111..833bc1c5f 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -224,9 +224,13 @@ class ApiAction extends Action
return $base;
} else {
$original = Notice::staticGet('id', $notice->repeat_of);
- $original_array = $this->twitterSimpleStatusArray($original, $include_user);
- $original_array['retweeted_status'] = $base;
- return $original_array;
+ if (empty($original)) {
+ return $base;
+ } else {
+ $original_array = $this->twitterSimpleStatusArray($original, $include_user);
+ $original_array['retweeted_status'] = $base;
+ return $original_array;
+ }
}
}
diff --git a/lib/router.php b/lib/router.php
index 8f68f86ac..474e05996 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -283,12 +283,13 @@ class Router
array('action' => 'ApiTimelineFriends',
'id' => '[a-zA-Z0-9]+',
'format' => '(xml|json|rss|atom)'));
+
$m->connect('api/statuses/home_timeline.:format',
- array('action' => 'ApiTimelineFriends',
+ array('action' => 'ApiTimelineHome',
'format' => '(xml|json|rss|atom)'));
$m->connect('api/statuses/home_timeline/:id.:format',
- array('action' => 'ApiTimelineFriends',
+ array('action' => 'ApiTimelineHome',
'id' => '[a-zA-Z0-9]+',
'format' => '(xml|json|rss|atom)'));