change User to use notice inboxes rather than subscription

darcs-hash:20081022210445-5ed1f-94a7b172f33411dfa8d1faaf7dc72169f57d6b39.gz
This commit is contained in:
Evan Prodromou 2008-10-22 17:04:45 -04:00
parent 0b0d58b433
commit 561140fbed

View File

@ -349,8 +349,8 @@ class User extends Memcached_DataObject
function noticesWithFriends($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0) {
$qry =
'SELECT notice.* ' .
'FROM notice JOIN subscription ON notice.profile_id = subscription.subscribed ' .
'WHERE subscription.subscriber = %d ';
'FROM notice JOIN notice_inbox ON notice.id = notice_inbox.notice_id ' .
'WHERE notice_inbox.user_id = %d ';
if ($since_id > 0) {
$qry .= ' AND notice.id > ' . $since_id . ' ';