123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class OutboxAction extends MailboxAction
- {
-
- function title()
- {
- if ($this->page > 1) {
-
-
- return sprintf(_('Outbox for %1$s - page %2$d'),
- $this->user->nickname, $page);
- } else {
-
- return sprintf(_('Outbox for %s'), $this->user->nickname);
- }
- }
-
- function getMessages()
- {
- $message = new Message();
- $message->from_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 OutboxMessageList($this, $message);
- }
-
- function getInstructions()
- {
-
- return _('This is your outbox, which lists private messages you have sent.');
- }
- }
- class OutboxMessageList extends MessageList
- {
- function newItem($message)
- {
- return new OutboxMessageListItem($this->out, $message);
- }
- }
- class OutboxMessageListItem extends MessageListItem
- {
-
- function getMessageProfile()
- {
- return $this->message->getTo();
- }
- }
|