X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fmicrosummary.php;h=03348617da9b1541b9094f1b85129dea234eda5b;hb=d6b28c64830f632bb2f4b6f3c9369b9e56ad217a;hp=5c01a9ce0f0646b945191f955da90b184fef262f;hpb=5d09b6b3f0595540c66b703ae085f0af904fe30f;p=quix0rs-gnu-social.git diff --git a/actions/microsummary.php b/actions/microsummary.php index 5c01a9ce0f..03348617da 100644 --- a/actions/microsummary.php +++ b/actions/microsummary.php @@ -46,35 +46,36 @@ class MicrosummaryAction extends Action { /** * Class handler. - * + * * @param array $args array of arguments * * @return nothing */ - function handle($args) + function handle(array $args=array()) { parent::handle($args); $nickname = common_canonical_nickname($this->arg('nickname')); - $user = User::staticGet('nickname', $nickname); + $user = User::getKV('nickname', $nickname); if (!$user) { - $this->clientError(_('No such user'), 404); - return; + // TRANS: Client error displayed trying to make a micro summary without providing a valid user. + $this->clientError(_('No such user.'), 404); } - + $notice = $user->getCurrentNotice(); - + if (!$notice) { - $this->clientError(_('No current status'), 404); + // TRANS: Client error displayed trying to make a micro summary without providing a status. + $this->clientError(_('No current status.'), 404); } - + header('Content-Type: text/plain'); - + print $user->nickname . ': ' . $notice->content; } - function isReadOnly($args) + function isReadOnly(array $args=array()) { return true; }