forked from GNUsocial/gnu-social
Harmonise UI message "No such user."
This commit is contained in:
parent
da444f8a15
commit
221b779e88
@ -102,7 +102,7 @@ class ApiAccountUpdateProfileImageAction extends ApiAuthAction
|
||||
}
|
||||
|
||||
if (empty($this->user)) {
|
||||
$this->clientError(_('No such user!'), 404, $this->format);
|
||||
$this->clientError(_('No such user.'), 404, $this->format);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ class ApiBlockCreateAction extends ApiAuthAction
|
||||
}
|
||||
|
||||
if (empty($this->user) || empty($this->other)) {
|
||||
$this->clientError(_('No such user!'), 404, $this->format);
|
||||
$this->clientError(_('No such user.'), 404, $this->format);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ class ApiBlockDestroyAction extends ApiAuthAction
|
||||
}
|
||||
|
||||
if (empty($this->user) || empty($this->other)) {
|
||||
$this->clientError(_('No such user!'), 404, $this->format);
|
||||
$this->clientError(_('No such user.'), 404, $this->format);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ class ApiDirectMessageAction extends ApiAuthAction
|
||||
$this->user = $this->auth_user;
|
||||
|
||||
if (empty($this->user)) {
|
||||
$this->clientError(_('No such user!'), 404, $this->format);
|
||||
$this->clientError(_('No such user.'), 404, $this->format);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ class ApiDirectMessageNewAction extends ApiAuthAction
|
||||
$this->user = $this->auth_user;
|
||||
|
||||
if (empty($this->user)) {
|
||||
$this->clientError(_('No such user!'), 404, $this->format);
|
||||
$this->clientError(_('No such user.'), 404, $this->format);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ class ApiGroupCreateAction extends ApiAuthAction
|
||||
}
|
||||
|
||||
if (empty($this->user)) {
|
||||
$this->clientError(_('No such user!'), 404, $this->format);
|
||||
$this->clientError(_('No such user.'), 404, $this->format);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction
|
||||
parent::handle($args);
|
||||
|
||||
if (empty($this->user)) {
|
||||
$this->clientError(_('No such user!'), 404, $this->format);
|
||||
$this->clientError(_('No such user.'), 404, $this->format);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ class ApiGroupJoinAction extends ApiAuthAction
|
||||
}
|
||||
|
||||
if (empty($this->user)) {
|
||||
$this->clientError(_('No such user!'), 404, $this->format);
|
||||
$this->clientError(_('No such user.'), 404, $this->format);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ class ApiGroupLeaveAction extends ApiAuthAction
|
||||
}
|
||||
|
||||
if (empty($this->user)) {
|
||||
$this->clientError(_('No such user!'), 404, $this->format);
|
||||
$this->clientError(_('No such user.'), 404, $this->format);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ class ApiGroupListAction extends ApiBareAuthAction
|
||||
parent::handle($args);
|
||||
|
||||
if (empty($this->user)) {
|
||||
$this->clientError(_('No such user!'), 404, $this->format);
|
||||
$this->clientError(_('No such user.'), 404, $this->format);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ class ApiStatusesUpdateAction extends ApiAuthAction
|
||||
}
|
||||
|
||||
if (empty($this->user)) {
|
||||
$this->clientError(_('No such user!'), 404, $this->format);
|
||||
$this->clientError(_('No such user.'), 404, $this->format);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ class ApiSubscriptionsAction extends ApiBareAuthAction
|
||||
$this->user = $this->getTargetUser($this->arg('id'));
|
||||
|
||||
if (empty($this->user)) {
|
||||
$this->clientError(_('No such user!'), 404, $this->format);
|
||||
$this->clientError(_('No such user.'), 404, $this->format);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction
|
||||
$this->user = $this->getTargetUser($this->arg('id'));
|
||||
|
||||
if (empty($this->user)) {
|
||||
$this->clientError(_('No such user!'), 404, $this->format);
|
||||
$this->clientError(_('No such user.'), 404, $this->format);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction
|
||||
$this->user = $this->getTargetUser($this->arg('id'));
|
||||
|
||||
if (empty($this->user)) {
|
||||
$this->clientError(_('No such user!'), 404, $this->format);
|
||||
$this->clientError(_('No such user.'), 404, $this->format);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction
|
||||
$this->user = $this->getTargetUser($this->arg('id'));
|
||||
|
||||
if (empty($this->user)) {
|
||||
$this->clientError(_('No such user!'), 404, $this->format);
|
||||
$this->clientError(_('No such user.'), 404, $this->format);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
|
||||
$this->user = $this->getTargetUser($this->arg('id'));
|
||||
|
||||
if (empty($this->user)) {
|
||||
$this->clientError(_('No such user!'), 404, $this->format);
|
||||
$this->clientError(_('No such user.'), 404, $this->format);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ class MicrosummaryAction extends Action
|
||||
$user = User::staticGet('nickname', $nickname);
|
||||
|
||||
if (!$user) {
|
||||
$this->clientError(_('No such user'), 404);
|
||||
$this->clientError(_('No such user.'), 404);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ class NewmessageAction extends Action
|
||||
$this->other = User::staticGet('id', $this->to);
|
||||
|
||||
if (!$this->other) {
|
||||
$this->clientError(_('No such user'), 404);
|
||||
$this->clientError(_('No such user.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ class RemotesubscribeAction extends Action
|
||||
$this->profile_url = $this->trimmed('profile_url');
|
||||
|
||||
if (!$this->profile_url) {
|
||||
$this->showForm(_('No such user'));
|
||||
$this->showForm(_('No such user.'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -351,7 +351,7 @@ class StatusNetOAuthDataStore extends OAuthDataStore
|
||||
$author = User::staticGet('uri', $author_uri);
|
||||
}
|
||||
if (!$author) {
|
||||
throw new Exception('No such user');
|
||||
throw new Exception('No such user.');
|
||||
}
|
||||
|
||||
common_log(LOG_DEBUG, print_r($author, true), __FILE__);
|
||||
@ -407,7 +407,7 @@ class StatusNetOAuthDataStore extends OAuthDataStore
|
||||
$user = User::staticGet('uri', $uri);
|
||||
}
|
||||
if (!$user) {
|
||||
throw new Exception('No such user');
|
||||
throw new Exception('No such user.');
|
||||
}
|
||||
return $user;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user