*/
function getNotices($limit=0)
{
- $cur = common_current_user();
- $user = $this->user;
-
- if (!empty($cur) && $cur->id == $user->id) {
- $notice = $this->user->noticeInbox(0, $limit);
- } else {
- $notice = $this->user->noticesWithFriends(0, $limit);
- }
+ $stream = new InboxNoticeStream($this->user);
+ $notice = $stream->getNotices(0, $limit, null, null);
- $notice = $user->noticesWithFriends(0, $limit);
$notices = array();
while ($notice->fetch()) {