X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fmailbox.php;h=3c7281e9852121d2b948b39eac803d092058e313;hb=8674b51144b8a646dceb63c3187d0f90741af3ed;hp=e9e4f78c6b07091486a1c95b7eec4720a2d6d380;hpb=cfe3e832932ace9c5ad028899a7765b206eaab81;p=quix0rs-gnu-social.git diff --git a/lib/mailbox.php b/lib/mailbox.php index e9e4f78c6b..3c7281e985 100644 --- a/lib/mailbox.php +++ b/lib/mailbox.php @@ -42,8 +42,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @see InboxAction * @see OutboxAction */ - -class MailboxAction extends CurrentUserDesignAction +class MailboxAction extends Action { var $page = null; @@ -52,7 +51,7 @@ class MailboxAction extends CurrentUserDesignAction 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) { @@ -71,22 +70,20 @@ class MailboxAction extends CurrentUserDesignAction * * @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(); @@ -114,8 +111,9 @@ class MailboxAction extends CurrentUserDesignAction $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.')); @@ -139,7 +137,6 @@ class MailboxAction extends CurrentUserDesignAction * * @return void */ - function showPageNotice() { $instr = $this->getInstructions(); @@ -157,7 +154,6 @@ class MailboxAction extends CurrentUserDesignAction * * @return boolean */ - function isReadOnly($args) { return true;