3 if (!defined('GNUSOCIAL')) { exit(1); }
5 class InboxMessageList extends MessageList
7 <<<<<<< .merge_file_NIw5Kk
8 function newItem($message)
12 function prepare(array $args=array())
14 parent::prepare($args);
16 $nickname = common_canonical_nickname($this->arg('nickname'));
17 $this->user = User::getKV('nickname', $nickname);
18 $this->page = $this->trimmed('page');
24 common_set_returnto($this->selfUrl());
30 * output page based on arguments
32 * @param array $args HTTP arguments (from $_REQUEST)
36 function handle(array $args=array())
38 parent::handle($args);
41 // TRANS: Client error displayed when trying to access a mailbox without providing a user.
42 $this->clientError(_('No such user.'), 404);
45 $cur = common_current_user();
47 if (!$cur || $cur->id != $this->user->id) {
48 // TRANS: Client error displayed when trying to access a mailbox that is not of the logged in user.
49 $this->clientError(_('Only the user can read their own mailboxes.'), 403);
55 function showNoticeForm()
57 $message_form = new MessageForm($this);
58 $message_form->show();
61 function showContent()
63 $message = $this->getMessages();
67 $ml = $this->getMessageList($message);
71 $this->pagination($this->page > 1,
72 $cnt > MESSAGES_PER_PAGE,
74 $this->trimmed('action'),
75 array('nickname' => $this->user->nickname));
79 // TRANS: Message displayed when there are no private messages in the inbox of a user.
80 _('You have no private messages. '.
81 'You can send private message to engage other users in conversation. '.
82 'People can send you messages for your eyes only.'));
86 function getMessages()
91 function getMessageList($message)
97 * Show the page notice
99 * Shows instructions for the page
103 function showPageNotice()
105 $instr = $this->getInstructions();
106 $output = common_markup_to_html($instr);
108 $this->elementStart('div', 'instructions');
110 $this->elementEnd('div');
114 * Mailbox actions are read only
116 * @param array $args other arguments
120 function isReadOnly(array $args=array())
125 function showObjectNav()
126 >>>>>>> .merge_file_WapUGk
128 return new InboxMessageListItem($this->out, $message);