diff --git a/classes/User.php b/classes/User.php index 25caf03585..ce7632ec5b 100644 --- a/classes/User.php +++ b/classes/User.php @@ -141,6 +141,19 @@ class User extends Memcached_DataObject return true; } + function noticesWithFriendsWindow() { + + + $notice = new Notice(); + + $notice->query('SELECT notice.* ' . + 'FROM notice JOIN subscription on notice.profile_id = subscription.subscribed ' . + 'WHERE subscription.subscriber = ' . $this->id . ' ' . + 'ORDER BY created DESC, notice.id DESC ' . + 'LIMIT 0, ' . WITHFRIENDS_CACHE_WINDOW); + + } + static function register($fields) { # MAGICALLY put fields into current scope