diff options
author | Brion Vibber <brion@pobox.com> | 2010-10-28 16:26:34 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-10-28 16:26:34 -0700 |
commit | b26eccf33cf69c04a96d5d6d3eddc0ef68ffd4b1 (patch) | |
tree | 9d7e6ecfb361b3f9c2149d3b6400ea0d84f9c497 /actions/apiusershow.php | |
parent | 1851933c344307fdbd864489bf6f1a42bf6a6096 (diff) | |
parent | 9e516ed1bbb7b7a32fce006e5f2915b0ca344b98 (diff) |
Merge branch '0.9.x' into 1.0.x
Diffstat (limited to 'actions/apiusershow.php')
-rw-r--r-- | actions/apiusershow.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/actions/apiusershow.php b/actions/apiusershow.php index 28993102c..fbd4d6059 100644 --- a/actions/apiusershow.php +++ b/actions/apiusershow.php @@ -49,7 +49,6 @@ require_once INSTALLDIR . '/lib/apiprivateauth.php'; * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class ApiUserShowAction extends ApiPrivateAuthAction { /** @@ -60,7 +59,6 @@ class ApiUserShowAction extends ApiPrivateAuthAction * @return boolean success flag * */ - function prepare($args) { parent::prepare($args); @@ -87,17 +85,18 @@ class ApiUserShowAction extends ApiPrivateAuthAction * * @return void */ - function handle($args) { parent::handle($args); if (empty($this->user)) { - $this->clientError(_('Not found.'), 404, $this->format); + // TRANS: Client error displayed when requesting user information for a non-existing user. + $this->clientError(_('User not found.'), 404, $this->format); return; } if (!in_array($this->format, array('xml', 'json'))) { + // TRANS: Client error displayed when trying to handle an unknown API method. $this->clientError(_('API method not found.'), $code = 404); return; } @@ -105,6 +104,7 @@ class ApiUserShowAction extends ApiPrivateAuthAction $profile = $this->user->getProfile(); if (empty($profile)) { + // TRANS: Client error displayed when requesting user information for a user without a profile. $this->clientError(_('User has no profile.')); return; } @@ -120,7 +120,6 @@ class ApiUserShowAction extends ApiPrivateAuthAction $this->showJsonObjects($twitter_user); $this->endDocument('json'); } - } /** @@ -132,10 +131,8 @@ class ApiUserShowAction extends ApiPrivateAuthAction * * @return boolean is read only action? */ - function isReadOnly($args) { return true; } - } |