123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class InboxAction extends MailboxAction
- {
-
- function title()
- {
- if ($this->page > 1) {
-
-
- return sprintf(_('Inbox for %1$s - page %2$d'), $this->user->nickname,
- $this->page);
- } else {
-
-
- return sprintf(_('Inbox for %s'), $this->user->nickname);
- }
- }
-
- function getMessages()
- {
- $message = new Message();
- $message->to_profile = $this->user->id;
- $message->orderBy('created DESC, id DESC');
- $message->limit((($this->page - 1) * MESSAGES_PER_PAGE),
- MESSAGES_PER_PAGE + 1);
- if ($message->find()) {
- return $message;
- } else {
- return null;
- }
- }
- function getMessageList($message)
- {
- return new InboxMessageList($this, $message);
- }
-
- function getInstructions()
- {
-
- return _('This is your inbox, which lists your incoming private messages.');
- }
- }
|