X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fmailbox.php;h=bc5ff76661a67925f47538d52cdcbcc0362effc3;hb=627d84a1e2db2aca5d2ce1272f6e83fb7faa8ad2;hp=db686a255a757f8b75a845dc82a8e0f3ea8e7815;hpb=7a9777df053a9007b5eaa71f5437584065b615a5;p=quix0rs-gnu-social.git diff --git a/lib/mailbox.php b/lib/mailbox.php index db686a255a..bc5ff76661 100644 --- a/lib/mailbox.php +++ b/lib/mailbox.php @@ -46,12 +46,12 @@ class MailboxAction extends Action { var $page = null; - function prepare($args) + function prepare(array $args=array()) { 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) { @@ -70,23 +70,20 @@ class MailboxAction extends Action * * @return void */ - function handle($args) + function handle(array $args=array()) { 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) { // 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); - return; + $this->clientError(_('Only the user can read their own mailboxes.'), 403); } $this->showPage(); @@ -157,7 +154,7 @@ class MailboxAction extends Action * * @return boolean */ - function isReadOnly($args) + function isReadOnly(array $args=array()) { return true; }