Пример #1
0
 function prepare($args)
 {
     if (parent::prepare($args)) {
         $this->notice = empty($this->tag) ? $this->user->getNotices(($this->page - 1) * NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1) : $this->user->getTaggedNotices($this->tag, ($this->page - 1) * NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1, 0, 0, null);
         return true;
     } else {
         return false;
     }
 }
Пример #2
0
 function prepare($args)
 {
     if (parent::prepare($args)) {
         $stream = new InboxNoticeStream($this->user->getProfile(), $this->scoped);
         $this->notice = $stream->getNotices(($this->page - 1) * NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1, null, null);
         return true;
     } else {
         return false;
     }
 }
Пример #3
0
 function prepare($args)
 {
     if (parent::prepare($args)) {
         $cur = common_current_user();
         $stream = new InboxNoticeStream($this->user, $cur->getProfile());
         $this->notice = $stream->getNotices(($this->page - 1) * NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1, null, null);
         return true;
     } else {
         return false;
     }
 }
Пример #4
0
 function prepare($args)
 {
     if (parent::prepare($args)) {
         $cur = common_current_user();
         if (!empty($cur) && $cur->id == $this->user->id) {
             $this->notice = $this->user->noticeInbox(($this->page - 1) * NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
         } else {
             $this->notice = $this->user->noticesWithFriends(($this->page - 1) * NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
         }
         return true;
     } else {
         return false;
     }
 }