* @see InboxAction
* @see OutboxAction
*/
-
-class MailboxAction extends CurrentUserDesignAction
+class MailboxAction extends Action
{
var $page = null;
parent::prepare($args);
$nickname = common_canonical_nickname($this->arg('nickname'));
- $this->user = User::staticGet('nickname', $nickname);
+ $this->user = User::getKV('nickname', $nickname);
$this->page = $this->trimmed('page');
if (!$this->page) {
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (!$this->user) {
+ // TRANS: Client error displayed when trying to access a mailbox without providing a user.
$this->clientError(_('No such user.'), 404);
- return;
}
$cur = common_current_user();
if (!$cur || $cur->id != $this->user->id) {
- $this->clientError(_('Only the user can read their own mailboxes.'),
- 403);
- return;
+ // TRANS: Client error displayed when trying to access a mailbox that is not of the logged in user.
+ $this->clientError(_('Only the user can read their own mailboxes.'), 403);
}
$this->showPage();
$this->trimmed('action'),
array('nickname' => $this->user->nickname));
} else {
- $this->element('p',
- 'guide',
+ $this->element('p',
+ 'guide',
+ // TRANS: Message displayed when there are no private messages in the inbox of a user.
_('You have no private messages. '.
'You can send private message to engage other users in conversation. '.
'People can send you messages for your eyes only.'));
*
* @return void
*/
-
function showPageNotice()
{
$instr = $this->getInstructions();
*
* @return boolean
*/
-
function isReadOnly($args)
{
return true;