From 64ed01f0aff569da2fd4ed589df9ed4ee9852cb7 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 22 Jul 2008 12:02:13 -0400 Subject: centralize and optimize with-friends query darcs-hash:20080722160213-84dde-2e466b9cc4601a8cb7237770a7df17a2f9dcadb9.gz --- actions/twitapistatuses.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'actions/twitapistatuses.php') diff --git a/actions/twitapistatuses.php b/actions/twitapistatuses.php index 47e3ffcd9..749f2f084 100644 --- a/actions/twitapistatuses.php +++ b/actions/twitapistatuses.php @@ -223,18 +223,8 @@ class TwitapistatusesAction extends TwitterapiAction { $link = common_local_url('all', array('nickname' => $user->nickname)); $subtitle = sprintf(_("Updates from %s and friends on %s!"), $user->nickname, $sitename); - $notice = new Notice(); - - # XXX: chokety and bad - - $notice->whereAdd('EXISTS (SELECT subscribed from subscription where subscriber = '.$profile->id.' and subscribed = notice.profile_id)', 'OR'); - $notice->whereAdd('profile_id = ' . $profile->id, 'OR'); - - # XXX: since - # XXX: since_id + $notice->$user->noticesWithFriends(); - $notice->orderBy('created DESC, notice.id DESC'); - $notice->limit((($page-1)*20), $count); $cnt = $notice->find(); -- cgit v1.2.3-54-g00ecf