Update message formatting for serverError to use a starting capital and a leading period.
This commit is contained in:
parent
58d5d7baee
commit
5c6c9b6f5f
@ -61,7 +61,7 @@ class AllAction extends ProfileAction
|
|||||||
|
|
||||||
if ($this->page > 1 && $this->notice->N == 0) {
|
if ($this->page > 1 && $this->notice->N == 0) {
|
||||||
// TRANS: Server error when page not found (404)
|
// TRANS: Server error when page not found (404)
|
||||||
$this->serverError(_('No such page'), $code = 404);
|
$this->serverError(_('No such page.'), $code = 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -69,7 +69,7 @@ class ApiTimelineRetweetedByMeAction extends ApiAuthAction
|
|||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
|
|
||||||
$this->serverError('Unimplemented', 503);
|
$this->serverError('Unimplemented.', 503);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ class AvatarsettingsAction extends AccountSettingsAction
|
|||||||
|
|
||||||
if (!$profile) {
|
if (!$profile) {
|
||||||
common_log_db_error($user, 'SELECT', __FILE__);
|
common_log_db_error($user, 'SELECT', __FILE__);
|
||||||
$this->serverError(_('User without matching profile'));
|
$this->serverError(_('User without matching profile.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ class AvatarsettingsAction extends AccountSettingsAction
|
|||||||
|
|
||||||
if (!$profile) {
|
if (!$profile) {
|
||||||
common_log_db_error($user, 'SELECT', __FILE__);
|
common_log_db_error($user, 'SELECT', __FILE__);
|
||||||
$this->serverError(_('User without matching profile'));
|
$this->serverError(_('User without matching profile.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ class ConfirmaddressAction extends Action
|
|||||||
}
|
}
|
||||||
$type = $confirm->address_type;
|
$type = $confirm->address_type;
|
||||||
if (!in_array($type, array('email', 'jabber', 'sms'))) {
|
if (!in_array($type, array('email', 'jabber', 'sms'))) {
|
||||||
$this->serverError(sprintf(_('Unrecognized address type %s'), $type));
|
$this->serverError(sprintf(_('Unrecognized address type %s.'), $type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($cur->$type == $confirm->address) {
|
if ($cur->$type == $confirm->address) {
|
||||||
|
@ -135,7 +135,7 @@ class FinishremotesubscribeAction extends Action
|
|||||||
$service->getServiceURI(OMB_ENDPOINT_UPDATEPROFILE);
|
$service->getServiceURI(OMB_ENDPOINT_UPDATEPROFILE);
|
||||||
|
|
||||||
if (!$remote->update($orig_remote)) {
|
if (!$remote->update($orig_remote)) {
|
||||||
$this->serverError(_('Error updating remote profile'));
|
$this->serverError(_('Error updating remote profile.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ class OembedAction extends Action
|
|||||||
$proxy_args = $r->map($path);
|
$proxy_args = $r->map($path);
|
||||||
|
|
||||||
if (!$proxy_args) {
|
if (!$proxy_args) {
|
||||||
$this->serverError(_("$path not found"), 404);
|
$this->serverError(_("$path not found."), 404);
|
||||||
}
|
}
|
||||||
$oembed=array();
|
$oembed=array();
|
||||||
$oembed['version']='1.0';
|
$oembed['version']='1.0';
|
||||||
@ -72,11 +72,11 @@ class OembedAction extends Action
|
|||||||
$id = $proxy_args['notice'];
|
$id = $proxy_args['notice'];
|
||||||
$notice = Notice::staticGet($id);
|
$notice = Notice::staticGet($id);
|
||||||
if(empty($notice)){
|
if(empty($notice)){
|
||||||
$this->serverError(_("notice $id not found"), 404);
|
$this->serverError(_("Notice $id not found."), 404);
|
||||||
}
|
}
|
||||||
$profile = $notice->getProfile();
|
$profile = $notice->getProfile();
|
||||||
if (empty($profile)) {
|
if (empty($profile)) {
|
||||||
$this->serverError(_('Notice has no profile'), 500);
|
$this->serverError(_('Notice has no profile.'), 500);
|
||||||
}
|
}
|
||||||
if (!empty($profile->fullname)) {
|
if (!empty($profile->fullname)) {
|
||||||
$authorname = $profile->fullname . ' (' . $profile->nickname . ')';
|
$authorname = $profile->fullname . ' (' . $profile->nickname . ')';
|
||||||
@ -95,7 +95,7 @@ class OembedAction extends Action
|
|||||||
$id = $proxy_args['attachment'];
|
$id = $proxy_args['attachment'];
|
||||||
$attachment = File::staticGet($id);
|
$attachment = File::staticGet($id);
|
||||||
if(empty($attachment)){
|
if(empty($attachment)){
|
||||||
$this->serverError(_("attachment $id not found"), 404);
|
$this->serverError(_("Attachment $id not found."), 404);
|
||||||
}
|
}
|
||||||
if(empty($attachment->filename) && $file_oembed = File_oembed::staticGet('file_id', $attachment->id)){
|
if(empty($attachment->filename) && $file_oembed = File_oembed::staticGet('file_id', $attachment->id)){
|
||||||
// Proxy the existing oembed information
|
// Proxy the existing oembed information
|
||||||
@ -123,7 +123,7 @@ class OembedAction extends Action
|
|||||||
if($attachment->title) $oembed['title']=$attachment->title;
|
if($attachment->title) $oembed['title']=$attachment->title;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$this->serverError(_("$path not supported for oembed requests"), 501);
|
$this->serverError(_("$path not supported for oembed requests."), 501);
|
||||||
}
|
}
|
||||||
switch($args['format']){
|
switch($args['format']){
|
||||||
case 'xml':
|
case 'xml':
|
||||||
@ -155,11 +155,11 @@ class OembedAction extends Action
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// TRANS: Error message displaying attachments. %s is a raw MIME type (eg 'image/png')
|
// TRANS: Error message displaying attachments. %s is a raw MIME type (eg 'image/png')
|
||||||
$this->serverError(sprintf(_('content type %s not supported'), $apidata['content-type']), 501);
|
$this->serverError(sprintf(_('Content type %s not supported.'), $apidata['content-type']), 501);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
// TRANS: Error message displaying attachments. %s is the site's base URL.
|
// TRANS: Error message displaying attachments. %s is the site's base URL.
|
||||||
$this->serverError(sprintf(_('Only %s urls over plain http please'), common_root_url()), 404);
|
$this->serverError(sprintf(_('Only %s URLs over plain HTTP please.'), common_root_url()), 404);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ class PublicAction extends Action
|
|||||||
|
|
||||||
if($this->page > 1 && $this->notice->N == 0){
|
if($this->page > 1 && $this->notice->N == 0){
|
||||||
// TRANS: Server error when page not found (404)
|
// TRANS: Server error when page not found (404)
|
||||||
$this->serverError(_('No such page'),$code=404);
|
$this->serverError(_('No such page.'),$code=404);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -188,7 +188,7 @@ class RemotesubscribeAction extends Action
|
|||||||
$profile = $user->getProfile();
|
$profile = $user->getProfile();
|
||||||
if (!$profile) {
|
if (!$profile) {
|
||||||
common_log_db_error($user, 'SELECT', __FILE__);
|
common_log_db_error($user, 'SELECT', __FILE__);
|
||||||
$this->serverError(_('User without matching profile'));
|
$this->serverError(_('User without matching profile.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ class RepliesAction extends OwnerDesignAction
|
|||||||
|
|
||||||
if($this->page > 1 && $this->notice->N == 0){
|
if($this->page > 1 && $this->notice->N == 0){
|
||||||
// TRANS: Server error when page not found (404)
|
// TRANS: Server error when page not found (404)
|
||||||
$this->serverError(_('No such page'),$code=404);
|
$this->serverError(_('No such page.'),$code=404);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -135,7 +135,7 @@ class ShowfavoritesAction extends OwnerDesignAction
|
|||||||
|
|
||||||
if($this->page > 1 && $this->notice->N == 0){
|
if($this->page > 1 && $this->notice->N == 0){
|
||||||
// TRANS: Server error when page not found (404)
|
// TRANS: Server error when page not found (404)
|
||||||
$this->serverError(_('No such page'),$code=404);
|
$this->serverError(_('No such page.'),$code=404);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -49,7 +49,7 @@ class TagAction extends Action
|
|||||||
|
|
||||||
if($this->page > 1 && $this->notice->N == 0){
|
if($this->page > 1 && $this->notice->N == 0){
|
||||||
// TRANS: Server error when page not found (404)
|
// TRANS: Server error when page not found (404)
|
||||||
$this->serverError(_('No such page'),$code=404);
|
$this->serverError(_('No such page.'),$code=404);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user