From 5f79bcdf51e0cbc17f62c6899207813f26a29214 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 22 Jul 2008 10:20:50 -0400 Subject: public timeline only gets local notices darcs-hash:20080722142050-84dde-b948048b7f85e24c59dc063ef298bcc4c386d33a.gz --- actions/twitapistatuses.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'actions/twitapistatuses.php') diff --git a/actions/twitapistatuses.php b/actions/twitapistatuses.php index 670aaebf0..47e3ffcd9 100644 --- a/actions/twitapistatuses.php +++ b/actions/twitapistatuses.php @@ -40,13 +40,14 @@ class TwitapistatusesAction extends TwitterapiAction { // Number of public statuses to return by default -- Twitter sends 20 $MAX_PUBSTATUSES = 20; - $notice = DB_DataObject::factory('notice'); + $notice = new Notice(); // FIXME: To really live up to the spec we need to build a list // of notices by users who have custom avatars, so fix this SQL -- Zach - # FIXME: bad performance - $notice->whereAdd('EXISTS (SELECT user.id from user where user.id = notice.profile_id)'); + # XXX: sub-optimal performance + + $notice->is_local = 1; $notice->orderBy('created DESC, notice.id DESC'); $notice->limit($MAX_PUBSTATUSES); $cnt = $notice->find(); -- cgit v1.2.3-54-g00ecf