summaryrefslogtreecommitdiff
path: root/actions/avatarbynickname.php
diff options
context:
space:
mode:
authorSiebrand Mazeland <s.mazeland@xs4all.nl>2010-10-31 00:58:35 +0200
committerSiebrand Mazeland <s.mazeland@xs4all.nl>2010-10-31 00:58:35 +0200
commit08edd1fedfab532b1266a99f4d4b4b13a2e3aa6b (patch)
tree385411290688892be9a6db12120e8fcede65a36f /actions/avatarbynickname.php
parent83233a8a43d45b10ad64f05123ee9b7f4d3b160b (diff)
* i18n/L10n updates.
* translator documentation added/updated. * superfluous whitespace removed.
Diffstat (limited to 'actions/avatarbynickname.php')
-rw-r--r--actions/avatarbynickname.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/actions/avatarbynickname.php b/actions/avatarbynickname.php
index 537950792..fa97a86eb 100644
--- a/actions/avatarbynickname.php
+++ b/actions/avatarbynickname.php
@@ -48,7 +48,7 @@ class AvatarbynicknameAction extends Action
* Class handler.
*
* @param array $args query arguments
- *
+ *
* @return boolean false if nickname or user isn't found
*/
function handle($args)
@@ -56,27 +56,32 @@ class AvatarbynicknameAction extends Action
parent::handle($args);
$nickname = $this->trimmed('nickname');
if (!$nickname) {
+ // TRANS: Client error displayed trying to get an avatar without providing a nickname.
$this->clientError(_('No nickname.'));
return;
}
$size = $this->trimmed('size');
if (!$size) {
+ // TRANS: Client error displayed trying to get an avatar without providing an avatar size.
$this->clientError(_('No size.'));
return;
}
$size = strtolower($size);
if (!in_array($size, array('original', '96', '48', '24'))) {
+ // TRANS: Client error displayed trying to get an avatar providing an invalid avatar size.
$this->clientError(_('Invalid size.'));
return;
}
$user = User::staticGet('nickname', $nickname);
if (!$user) {
+ // TRANS: Client error displayed trying to get an avatar for a non-existing user.
$this->clientError(_('No such user.'));
return;
}
$profile = $user->getProfile();
if (!$profile) {
+ // TRANS: Client error displayed trying to get an avatar for a user without a profile.
$this->clientError(_('User has no profile.'));
return;
}
@@ -103,4 +108,3 @@ class AvatarbynicknameAction extends Action
return true;
}
}
-