summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/all.php2
-rw-r--r--actions/apiaccountupdatedeliverydevice.php2
-rw-r--r--actions/apigroupcreate.php2
-rw-r--r--actions/apigroupismember.php2
-rw-r--r--actions/apigroupjoin.php2
-rw-r--r--actions/apigroupleave.php2
-rw-r--r--actions/apigroupmembership.php2
-rw-r--r--actions/apigroupshow.php2
-rw-r--r--actions/apistatusesupdate.php2
-rw-r--r--actions/apitimelinegroup.php2
-rw-r--r--actions/apitimelineretweetedbyme.php2
-rw-r--r--actions/avatarsettings.php4
-rw-r--r--actions/block.php2
-rw-r--r--actions/bookmarklet.php3
-rw-r--r--actions/confirmaddress.php2
-rw-r--r--actions/deleteuser.php4
-rw-r--r--actions/designadminpanel.php4
-rw-r--r--actions/disfavor.php2
-rw-r--r--actions/favor.php2
-rw-r--r--actions/finishremotesubscribe.php2
-rw-r--r--actions/grantrole.php8
-rw-r--r--actions/groupblock.php35
-rw-r--r--actions/groupmembers.php23
-rw-r--r--actions/imsettings.php2
-rw-r--r--actions/invite.php2
-rw-r--r--actions/makeadmin.php29
-rw-r--r--actions/microsummary.php2
-rw-r--r--actions/oauthconnectionssettings.php4
-rw-r--r--actions/oembed.php16
-rw-r--r--actions/pathsadminpanel.php10
-rw-r--r--actions/peopletag.php2
-rw-r--r--actions/postnotice.php2
-rw-r--r--actions/public.php4
-rw-r--r--actions/register.php14
-rw-r--r--actions/remotesubscribe.php2
-rw-r--r--actions/repeat.php10
-rw-r--r--actions/replies.php2
-rw-r--r--actions/revokerole.php6
-rw-r--r--actions/sandbox.php4
-rw-r--r--actions/showfavorites.php2
-rw-r--r--actions/shownotice.php2
-rw-r--r--actions/silence.php4
-rw-r--r--actions/siteadminpanel.php4
-rw-r--r--actions/sitenoticeadminpanel.php2
-rw-r--r--actions/snapshotadminpanel.php6
-rw-r--r--actions/subscribers.php10
-rw-r--r--actions/tag.php2
-rw-r--r--actions/unsandbox.php4
-rw-r--r--actions/unsilence.php4
-rw-r--r--actions/unsubscribe.php2
-rw-r--r--actions/userauthorization.php2
-rw-r--r--actions/userrss.php2
52 files changed, 145 insertions, 125 deletions
diff --git a/actions/all.php b/actions/all.php
index 8c22e6f5f..a977fce95 100644
--- a/actions/all.php
+++ b/actions/all.php
@@ -61,7 +61,7 @@ class AllAction extends ProfileAction
if ($this->page > 1 && $this->notice->N == 0) {
// TRANS: Server error when page not found (404)
- $this->serverError(_('No such page'), $code = 404);
+ $this->serverError(_('No such page.'), $code = 404);
}
return true;
diff --git a/actions/apiaccountupdatedeliverydevice.php b/actions/apiaccountupdatedeliverydevice.php
index 684906fe9..05d19c22d 100644
--- a/actions/apiaccountupdatedeliverydevice.php
+++ b/actions/apiaccountupdatedeliverydevice.php
@@ -103,7 +103,7 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
$this->clientError(
_(
'You must specify a parameter named ' .
- '\'device\' with a value of one of: sms, im, none'
+ '\'device\' with a value of one of: sms, im, none.'
)
);
return;
diff --git a/actions/apigroupcreate.php b/actions/apigroupcreate.php
index 145806356..3eb3ae5fc 100644
--- a/actions/apigroupcreate.php
+++ b/actions/apigroupcreate.php
@@ -263,7 +263,7 @@ class ApiGroupCreateAction extends ApiAuthAction
if (!$valid) {
$this->clientError(
- sprintf(_('Invalid alias: "%s"'), $alias),
+ sprintf(_('Invalid alias: "%s".'), $alias),
403,
$this->format
);
diff --git a/actions/apigroupismember.php b/actions/apigroupismember.php
index 97f843561..f51c747df 100644
--- a/actions/apigroupismember.php
+++ b/actions/apigroupismember.php
@@ -92,7 +92,7 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction
}
if (empty($this->group)) {
- $this->clientError(_('Group not found!'), 404, $this->format);
+ $this->clientError(_('Group not found.'), 404, $this->format);
return false;
}
diff --git a/actions/apigroupjoin.php b/actions/apigroupjoin.php
index 374cf83df..28df72fa9 100644
--- a/actions/apigroupjoin.php
+++ b/actions/apigroupjoin.php
@@ -101,7 +101,7 @@ class ApiGroupJoinAction extends ApiAuthAction
}
if (empty($this->group)) {
- $this->clientError(_('Group not found!'), 404, $this->format);
+ $this->clientError(_('Group not found.'), 404, $this->format);
return false;
}
diff --git a/actions/apigroupleave.php b/actions/apigroupleave.php
index 9848ece05..f6e52b26e 100644
--- a/actions/apigroupleave.php
+++ b/actions/apigroupleave.php
@@ -101,7 +101,7 @@ class ApiGroupLeaveAction extends ApiAuthAction
}
if (empty($this->group)) {
- $this->clientError(_('Group not found!'), 404, $this->format);
+ $this->clientError(_('Group not found.'), 404, $this->format);
return false;
}
diff --git a/actions/apigroupmembership.php b/actions/apigroupmembership.php
index 9f72b527c..c97b27fac 100644
--- a/actions/apigroupmembership.php
+++ b/actions/apigroupmembership.php
@@ -88,7 +88,7 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction
parent::handle($args);
if (empty($this->group)) {
- $this->clientError(_('Group not found!'), 404, $this->format);
+ $this->clientError(_('Group not found.'), 404, $this->format);
return false;
}
diff --git a/actions/apigroupshow.php b/actions/apigroupshow.php
index 5745a81f4..8e471689a 100644
--- a/actions/apigroupshow.php
+++ b/actions/apigroupshow.php
@@ -79,7 +79,7 @@ class ApiGroupShowAction extends ApiPrivateAuthAction
common_redirect(common_local_url('ApiGroupShow', $args), 301);
} else {
$this->clientError(
- _('Group not found!'),
+ _('Group not found.'),
404,
$this->format
);
diff --git a/actions/apistatusesupdate.php b/actions/apistatusesupdate.php
index 1956c8586..d4ef6b550 100644
--- a/actions/apistatusesupdate.php
+++ b/actions/apistatusesupdate.php
@@ -199,7 +199,7 @@ class ApiStatusesUpdateAction extends ApiAuthAction
$reply_to = $this->in_reply_to_status_id;
} else {
$this->clientError(
- _('Not found'),
+ _('Not found.'),
$code = 404,
$this->format
);
diff --git a/actions/apitimelinegroup.php b/actions/apitimelinegroup.php
index da816c40a..56d1de094 100644
--- a/actions/apitimelinegroup.php
+++ b/actions/apitimelinegroup.php
@@ -88,7 +88,7 @@ class ApiTimelineGroupAction extends ApiPrivateAuthAction
parent::handle($args);
if (empty($this->group)) {
- $this->clientError(_('Group not found!'), 404, $this->format);
+ $this->clientError(_('Group not found.'), 404, $this->format);
return false;
}
diff --git a/actions/apitimelineretweetedbyme.php b/actions/apitimelineretweetedbyme.php
index 564e98619..af05623cd 100644
--- a/actions/apitimelineretweetedbyme.php
+++ b/actions/apitimelineretweetedbyme.php
@@ -69,7 +69,7 @@ class ApiTimelineRetweetedByMeAction extends ApiAuthAction
{
parent::prepare($args);
- $this->serverError('Unimplemented', 503);
+ $this->serverError('Unimplemented.', 503);
return false;
}
diff --git a/actions/avatarsettings.php b/actions/avatarsettings.php
index d4ea11cb7..52dc2e424 100644
--- a/actions/avatarsettings.php
+++ b/actions/avatarsettings.php
@@ -103,7 +103,7 @@ class AvatarsettingsAction extends AccountSettingsAction
if (!$profile) {
common_log_db_error($user, 'SELECT', __FILE__);
- $this->serverError(_('User without matching profile'));
+ $this->serverError(_('User without matching profile.'));
return;
}
@@ -182,7 +182,7 @@ class AvatarsettingsAction extends AccountSettingsAction
if (!$profile) {
common_log_db_error($user, 'SELECT', __FILE__);
- $this->serverError(_('User without matching profile'));
+ $this->serverError(_('User without matching profile.'));
return;
}
diff --git a/actions/block.php b/actions/block.php
index fe4ec0088..7f609c253 100644
--- a/actions/block.php
+++ b/actions/block.php
@@ -66,7 +66,7 @@ class BlockAction extends ProfileFormAction
assert(!empty($cur)); // checked by parent
if ($cur->hasBlocked($this->profile)) {
- $this->clientError(_("You already blocked that user."));
+ $this->clientError(_('You already blocked that user.'));
return false;
}
diff --git a/actions/bookmarklet.php b/actions/bookmarklet.php
index 0603a7456..041c2e894 100644
--- a/actions/bookmarklet.php
+++ b/actions/bookmarklet.php
@@ -47,7 +47,8 @@ class BookmarkletAction extends NewnoticeAction
{
function showTitle()
{
- $this->element('title', null, _('Post to ').common_config('site', 'name'));
+ // TRANS: Title for mini-posting window loaded from bookmarklet.
+ $this->element('title', null, sprintf(_('Post to %s'), common_config('site', 'name')));
}
function showHeader()
diff --git a/actions/confirmaddress.php b/actions/confirmaddress.php
index cc8351d8d..dc17499f5 100644
--- a/actions/confirmaddress.php
+++ b/actions/confirmaddress.php
@@ -87,7 +87,7 @@ class ConfirmaddressAction extends Action
}
$type = $confirm->address_type;
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;
}
if ($cur->$type == $confirm->address) {
diff --git a/actions/deleteuser.php b/actions/deleteuser.php
index 4e6b27395..42ef4b9f5 100644
--- a/actions/deleteuser.php
+++ b/actions/deleteuser.php
@@ -64,14 +64,14 @@ class DeleteuserAction extends ProfileFormAction
assert(!empty($cur)); // checked by parent
if (!$cur->hasRight(Right::DELETEUSER)) {
- $this->clientError(_("You cannot delete users."));
+ $this->clientError(_('You cannot delete users.'));
return false;
}
$this->user = User::staticGet('id', $this->profile->id);
if (empty($this->user)) {
- $this->clientError(_("You can only delete local users."));
+ $this->clientError(_('You can only delete local users.'));
return false;
}
diff --git a/actions/designadminpanel.php b/actions/designadminpanel.php
index 30e8bde1a..41d917e3c 100644
--- a/actions/designadminpanel.php
+++ b/actions/designadminpanel.php
@@ -272,11 +272,11 @@ class DesignadminpanelAction extends AdminPanelAction
{
if (!empty($values['logo']) &&
!Validate::uri($values['logo'], array('allowed_schemes' => array('http', 'https')))) {
- $this->clientError(_("Invalid logo URL."));
+ $this->clientError(_('Invalid logo URL.'));
}
if (!in_array($values['theme'], Theme::listAvailable())) {
- $this->clientError(sprintf(_("Theme not available: %s"), $values['theme']));
+ $this->clientError(sprintf(_("Theme not available: %s."), $values['theme']));
}
}
diff --git a/actions/disfavor.php b/actions/disfavor.php
index 6269f1bd2..3ccdd69af 100644
--- a/actions/disfavor.php
+++ b/actions/disfavor.php
@@ -71,7 +71,7 @@ class DisfavorAction extends Action
$notice = Notice::staticGet($id);
$token = $this->trimmed('token-'.$notice->id);
if (!$token || $token != common_session_token()) {
- $this->clientError(_("There was a problem with your session token. Try again, please."));
+ $this->clientError(_('There was a problem with your session token. Try again, please.'));
return;
}
$fave = new Fave();
diff --git a/actions/favor.php b/actions/favor.php
index afca9768a..475912fd0 100644
--- a/actions/favor.php
+++ b/actions/favor.php
@@ -72,7 +72,7 @@ class FavorAction extends Action
$notice = Notice::staticGet($id);
$token = $this->trimmed('token-'.$notice->id);
if (!$token || $token != common_session_token()) {
- $this->clientError(_("There was a problem with your session token. Try again, please."));
+ $this->clientError(_('There was a problem with your session token. Try again, please.'));
return;
}
if ($user->hasFave($notice)) {
diff --git a/actions/finishremotesubscribe.php b/actions/finishremotesubscribe.php
index deee70f36..ac51ddec3 100644
--- a/actions/finishremotesubscribe.php
+++ b/actions/finishremotesubscribe.php
@@ -135,7 +135,7 @@ class FinishremotesubscribeAction extends Action
$service->getServiceURI(OMB_ENDPOINT_UPDATEPROFILE);
if (!$remote->update($orig_remote)) {
- $this->serverError(_('Error updating remote profile'));
+ $this->serverError(_('Error updating remote profile.'));
return;
}
diff --git a/actions/grantrole.php b/actions/grantrole.php
index cd6bd4d79..b8b23d02e 100644
--- a/actions/grantrole.php
+++ b/actions/grantrole.php
@@ -59,11 +59,11 @@ class GrantRoleAction extends ProfileFormAction
$this->role = $this->arg('role');
if (!Profile_role::isValid($this->role)) {
- $this->clientError(_("Invalid role."));
+ $this->clientError(_('Invalid role.'));
return false;
}
if (!Profile_role::isSettable($this->role)) {
- $this->clientError(_("This role is reserved and cannot be set."));
+ $this->clientError(_('This role is reserved and cannot be set.'));
return false;
}
@@ -72,14 +72,14 @@ class GrantRoleAction extends ProfileFormAction
assert(!empty($cur)); // checked by parent
if (!$cur->hasRight(Right::GRANTROLE)) {
- $this->clientError(_("You cannot grant user roles on this site."));
+ $this->clientError(_('You cannot grant user roles on this site.'));
return false;
}
assert(!empty($this->profile)); // checked by parent
if ($this->profile->hasRole($this->role)) {
- $this->clientError(_("User already has this role."));
+ $this->clientError(_('User already has this role.'));
return false;
}
diff --git a/actions/groupblock.php b/actions/groupblock.php
index 88d7634a2..fc95c0e66 100644
--- a/actions/groupblock.php
+++ b/actions/groupblock.php
@@ -41,7 +41,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
* @link http://status.net/
*/
-class GroupblockAction extends Action
+class GroupblockAction extends RedirectingAction
{
var $profile = null;
var $group = null;
@@ -117,9 +117,7 @@ class GroupblockAction extends Action
parent::handle($args);
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($this->arg('no')) {
- common_redirect(common_local_url('groupmembers',
- array('nickname' => $this->group->nickname)),
- 303);
+ $this->returnToArgs();
} elseif ($this->arg('yes')) {
$this->blockProfile();
} elseif ($this->arg('blockto')) {
@@ -196,23 +194,20 @@ class GroupblockAction extends Action
$this->serverError(_("Database error blocking user from group."));
return false;
}
+
+ $this->returnToArgs();
+ }
- // Now, gotta figure where we go back to
- foreach ($this->args as $k => $v) {
- if ($k == 'returnto-action') {
- $action = $v;
- } elseif (substr($k, 0, 9) == 'returnto-') {
- $args[substr($k, 9)] = $v;
- }
- }
-
- if ($action) {
- common_redirect(common_local_url($action, $args), 303);
- } else {
- common_redirect(common_local_url('groupmembers',
- array('nickname' => $this->group->nickname)),
- 303);
- }
+ /**
+ * If we reached this form without returnto arguments, default to
+ * the top of the group's member list.
+ *
+ * @return string URL
+ */
+ function defaultReturnTo()
+ {
+ return common_local_url('groupmembers',
+ array('nickname' => $this->group->nickname));
}
function showScripts()
diff --git a/actions/groupmembers.php b/actions/groupmembers.php
index e72ef371a..54f1d8dcd 100644
--- a/actions/groupmembers.php
+++ b/actions/groupmembers.php
@@ -205,8 +205,7 @@ class GroupMemberListItem extends ProfileListItem
!$this->profile->isAdmin($this->group)) {
$this->out->elementStart('li', 'entity_make_admin');
$maf = new MakeAdminForm($this->out, $this->profile, $this->group,
- array('action' => 'groupmembers',
- 'nickname' => $this->group->nickname));
+ $this->returnToArgs());
$maf->show();
$this->out->elementEnd('li');
}
@@ -220,8 +219,7 @@ class GroupMemberListItem extends ProfileListItem
if (!empty($user) && $user->id != $this->profile->id && $user->isAdmin($this->group)) {
$this->out->elementStart('li', 'entity_block');
$bf = new GroupBlockForm($this->out, $this->profile, $this->group,
- array('action' => 'groupmembers',
- 'nickname' => $this->group->nickname));
+ $this->returnToArgs());
$bf->show();
$this->out->elementEnd('li');
}
@@ -248,6 +246,23 @@ class GroupMemberListItem extends ProfileListItem
return $aAttrs;
}
+
+ /**
+ * Fetch necessary return-to arguments for the profile forms
+ * to return to this list when they're done.
+ *
+ * @return array
+ */
+ protected function returnToArgs()
+ {
+ $args = array('action' => 'groupmembers',
+ 'nickname' => $this->group->nickname);
+ $page = $this->out->arg('page');
+ if ($page) {
+ $args['param-page'] = $page;
+ }
+ return $args;
+ }
}
/**
diff --git a/actions/imsettings.php b/actions/imsettings.php
index af4915843..c3360fb12 100644
--- a/actions/imsettings.php
+++ b/actions/imsettings.php
@@ -292,7 +292,7 @@ class ImsettingsAction extends ConnectSettingsAction
$this->showForm(_('Cannot normalize that Jabber ID'));
return;
}
- if (!jabber_valid_base_jid($jabber)) {
+ if (!jabber_valid_base_jid($jabber, common_config('email', 'domain_check'))) {
$this->showForm(_('Not a valid Jabber ID'));
return;
} else if ($user->jabber == $jabber) {
diff --git a/actions/invite.php b/actions/invite.php
index 54b2de62a..5dac048b0 100644
--- a/actions/invite.php
+++ b/actions/invite.php
@@ -38,7 +38,7 @@ class InviteAction extends CurrentUserDesignAction
if (!common_config('invite', 'enabled')) {
$this->clientError(_('Invites have been disabled.'));
} else if (!common_logged_in()) {
- $this->clientError(sprintf(_('You must be logged in to invite other users to use %s'),
+ $this->clientError(sprintf(_('You must be logged in to invite other users to use %s.'),
common_config('site', 'name')));
return;
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
diff --git a/actions/makeadmin.php b/actions/makeadmin.php
index f19348648..9ccb44230 100644
--- a/actions/makeadmin.php
+++ b/actions/makeadmin.php
@@ -41,7 +41,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
* @link http://status.net/
*/
-class MakeadminAction extends Action
+class MakeadminAction extends RedirectingAction
{
var $profile = null;
var $group = null;
@@ -148,20 +148,19 @@ class MakeadminAction extends Action
$this->group->getBestName());
}
- foreach ($this->args as $k => $v) {
- if ($k == 'returnto-action') {
- $action = $v;
- } else if (substr($k, 0, 9) == 'returnto-') {
- $args[substr($k, 9)] = $v;
- }
- }
+ $this->returnToArgs();
+ }
- if ($action) {
- common_redirect(common_local_url($action, $args), 303);
- } else {
- common_redirect(common_local_url('groupmembers',
- array('nickname' => $this->group->nickname)),
- 303);
- }
+ /**
+ * If we reached this form without returnto arguments, default to
+ * the top of the group's member list.
+ *
+ * @return string URL
+ */
+ function defaultReturnTo()
+ {
+ return common_local_url('groupmembers',
+ array('nickname' => $this->group->nickname));
}
+
}
diff --git a/actions/microsummary.php b/actions/microsummary.php
index 5c761e8bb..d145dc3bc 100644
--- a/actions/microsummary.php
+++ b/actions/microsummary.php
@@ -66,7 +66,7 @@ class MicrosummaryAction extends Action
$notice = $user->getCurrentNotice();
if (!$notice) {
- $this->clientError(_('No current status'), 404);
+ $this->clientError(_('No current status.'), 404);
}
header('Content-Type: text/plain');
diff --git a/actions/oauthconnectionssettings.php b/actions/oauthconnectionssettings.php
index f125f4c63..8a206d710 100644
--- a/actions/oauthconnectionssettings.php
+++ b/actions/oauthconnectionssettings.php
@@ -183,7 +183,7 @@ class OauthconnectionssettingsAction extends ConnectSettingsAction
if (!$result) {
common_log_db_error($orig, 'DELETE', __FILE__);
- $this->clientError(_('Unable to revoke access for app: ' . $app->id));
+ $this->clientError(sprintf(_('Unable to revoke access for app: %s.'), $app->id));
return false;
}
@@ -195,7 +195,7 @@ class OauthconnectionssettingsAction extends ConnectSettingsAction
function showEmptyListMessage()
{
- $message = sprintf(_('You have not authorized any applications to use your account.'));
+ $message = _('You have not authorized any applications to use your account.');
$this->elementStart('div', 'guide');
$this->raw(common_markup_to_html($message));
diff --git a/actions/oembed.php b/actions/oembed.php
index e287b6ae2..1503aa9c2 100644
--- a/actions/oembed.php
+++ b/actions/oembed.php
@@ -60,7 +60,7 @@ class OembedAction extends Action
$proxy_args = $r->map($path);
if (!$proxy_args) {
- $this->serverError(_("$path not found"), 404);
+ $this->serverError(_("$path not found."), 404);
}
$oembed=array();
$oembed['version']='1.0';
@@ -72,11 +72,11 @@ class OembedAction extends Action
$id = $proxy_args['notice'];
$notice = Notice::staticGet($id);
if(empty($notice)){
- $this->serverError(_("notice $id not found"), 404);
+ $this->serverError(_("Notice $id not found."), 404);
}
$profile = $notice->getProfile();
if (empty($profile)) {
- $this->serverError(_('Notice has no profile'), 500);
+ $this->serverError(_('Notice has no profile.'), 500);
}
if (!empty($profile->fullname)) {
$authorname = $profile->fullname . ' (' . $profile->nickname . ')';
@@ -95,7 +95,7 @@ class OembedAction extends Action
$id = $proxy_args['attachment'];
$attachment = File::staticGet($id);
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)){
// Proxy the existing oembed information
@@ -123,7 +123,7 @@ class OembedAction extends Action
if($attachment->title) $oembed['title']=$attachment->title;
break;
default:
- $this->serverError(_("$path not supported for oembed requests"), 501);
+ $this->serverError(_("$path not supported for oembed requests."), 501);
}
switch($args['format']){
case 'xml':
@@ -154,10 +154,12 @@ class OembedAction extends Action
$this->end_document('json');
break;
default:
- $this->serverError(_('content type ' . $apidata['content-type'] . ' not supported'), 501);
+ // 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);
}
}else{
- $this->serverError(_('Only ' . common_root_url() . ' urls over plain http please'), 404);
+ // 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);
}
}
diff --git a/actions/pathsadminpanel.php b/actions/pathsadminpanel.php
index 9155a7e42..7ff3c2583 100644
--- a/actions/pathsadminpanel.php
+++ b/actions/pathsadminpanel.php
@@ -154,19 +154,19 @@ class PathsadminpanelAction extends AdminPanelAction
// Validate theme dir
if (!empty($values['theme']['dir']) && !is_readable($values['theme']['dir'])) {
- $this->clientError(sprintf(_("Theme directory not readable: %s"), $values['theme']['dir']));
+ $this->clientError(sprintf(_("Theme directory not readable: %s."), $values['theme']['dir']));
}
// Validate avatar dir
if (empty($values['avatar']['dir']) || !is_writable($values['avatar']['dir'])) {
- $this->clientError(sprintf(_("Avatar directory not writable: %s"), $values['avatar']['dir']));
+ $this->clientError(sprintf(_("Avatar directory not writable: %s."), $values['avatar']['dir']));
}
// Validate background dir
if (empty($values['background']['dir']) || !is_writable($values['background']['dir'])) {
- $this->clientError(sprintf(_("Background directory not writable: %s"), $values['background']['dir']));
+ $this->clientError(sprintf(_("Background directory not writable: %s."), $values['background']['dir']));
}
// Validate locales dir
@@ -174,13 +174,13 @@ class PathsadminpanelAction extends AdminPanelAction
// XXX: What else do we need to validate for lacales path here? --Z
if (!empty($values['site']['locale_path']) && !is_readable($values['site']['locale_path'])) {
- $this->clientError(sprintf(_("Locales directory not readable: %s"), $values['site']['locale_path']));
+ $this->clientError(sprintf(_("Locales directory not readable: %s."), $values['site']['locale_path']));
}
// Validate SSL setup
if (mb_strlen($values['site']['sslserver']) > 255) {
- $this->clientError(_("Invalid SSL server. The maximum length is 255 characters."));
+ $this->clientError(_('Invalid SSL server. The maximum length is 255 characters.'));
}
}
diff --git a/actions/peopletag.php b/actions/peopletag.php
index 32652f755..7287cfbf9 100644
--- a/actions/peopletag.php
+++ b/actions/peopletag.php
@@ -65,7 +65,7 @@ class PeopletagAction extends Action
$this->tag = $this->trimmed('tag');
if (!common_valid_profile_tag($this->tag)) {
- $this->clientError(sprintf(_('Not a valid people tag: %s'),
+ $this->clientError(sprintf(_('Not a valid people tag: %s.'),
$this->tag));
return;
}
diff --git a/actions/postnotice.php b/actions/postnotice.php
index b2f6f1bb9..694c7808d 100644
--- a/actions/postnotice.php
+++ b/actions/postnotice.php
@@ -92,7 +92,7 @@ class PostnoticeAction extends Action
{
$content = common_shorten_links($_POST['omb_notice_content']);
if (Notice::contentTooLong($content)) {
- $this->clientError(_('Invalid notice content'), 400);
+ $this->clientError(_('Invalid notice content.'), 400);
return false;
}
$license = $_POST['omb_notice_license'];
diff --git a/actions/public.php b/actions/public.php
index 0b3b5fde8..5fc547fea 100644
--- a/actions/public.php
+++ b/actions/public.php
@@ -80,7 +80,7 @@ class PublicAction extends Action
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
if ($this->page > MAX_PUBLIC_PAGE) {
- $this->clientError(sprintf(_("Beyond the page limit (%s)"), MAX_PUBLIC_PAGE));
+ $this->clientError(sprintf(_("Beyond the page limit (%s)."), MAX_PUBLIC_PAGE));
}
common_set_returnto($this->selfUrl());
@@ -95,7 +95,7 @@ class PublicAction extends Action
if($this->page > 1 && $this->notice->N == 0){
// TRANS: Server error when page not found (404)
- $this->serverError(_('No such page'),$code=404);
+ $this->serverError(_('No such page.'),$code=404);
}
return true;
diff --git a/actions/register.php b/actions/register.php
index ccab76cf0..da8d0a0bb 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -491,11 +491,15 @@ class RegisterAction extends Action
$this->elementStart('li');
$this->element('input', $attrs);
$this->elementStart('label', array('class' => 'checkbox', 'for' => 'license'));
- $this->text(_('My text and files are available under '));
- $this->element('a', array('href' => common_config('license', 'url')),
- common_config('license', 'title'), _("Creative Commons Attribution 3.0"));
- $this->text(_(' except this private data: password, '.
- 'email address, IM address, and phone number.'));
+ $message = _('My text and files are available under %s ' .
+ 'except this private data: password, ' .
+ 'email address, IM address, and phone number.');
+ $link = '<a href="' .
+ htmlspecialchars(common_config('license', 'url')) .
+ '">' .
+ htmlspecialchars(common_config('license', 'title')) .
+ '</a>';
+ $this->raw(sprintf(htmlspecialchars($message), $link));
$this->elementEnd('label');
$this->elementEnd('li');
}
diff --git a/actions/remotesubscribe.php b/actions/remotesubscribe.php
index c723d53a1..9fc235e74 100644
--- a/actions/remotesubscribe.php
+++ b/actions/remotesubscribe.php
@@ -188,7 +188,7 @@ class RemotesubscribeAction extends Action
$profile = $user->getProfile();
if (!$profile) {
common_log_db_error($user, 'SELECT', __FILE__);
- $this->serverError(_('User without matching profile'));
+ $this->serverError(_('User without matching profile.'));
return;
}
diff --git a/actions/repeat.php b/actions/repeat.php
index e112496bc..893cae4ff 100644
--- a/actions/repeat.php
+++ b/actions/repeat.php
@@ -54,21 +54,21 @@ class RepeatAction extends Action
$this->user = common_current_user();
if (empty($this->user)) {
- $this->clientError(_("Only logged-in users can repeat notices."));
+ $this->clientError(_('Only logged-in users can repeat notices.'));
return false;
}
$id = $this->trimmed('notice');
if (empty($id)) {
- $this->clientError(_("No notice specified."));
+ $this->clientError(_('No notice specified.'));
return false;
}
$this->notice = Notice::staticGet('id', $id);
if (empty($this->notice)) {
- $this->clientError(_("No notice specified."));
+ $this->clientError(_('No notice specified.'));
return false;
}
@@ -80,14 +80,14 @@ class RepeatAction extends Action
$token = $this->trimmed('token-'.$id);
if (empty($token) || $token != common_session_token()) {
- $this->clientError(_("There was a problem with your session token. Try again, please."));
+ $this->clientError(_('There was a problem with your session token. Try again, please.'));
return false;
}
$profile = $this->user->getProfile();
if ($profile->hasRepeated($id)) {
- $this->clientError(_("You already repeated that notice."));
+ $this->clientError(_('You already repeated that notice.'));
return false;
}
diff --git a/actions/replies.php b/actions/replies.php
index 4ff1b7a8d..608f71d6e 100644
--- a/actions/replies.php
+++ b/actions/replies.php
@@ -90,7 +90,7 @@ class RepliesAction extends OwnerDesignAction
if($this->page > 1 && $this->notice->N == 0){
// TRANS: Server error when page not found (404)
- $this->serverError(_('No such page'),$code=404);
+ $this->serverError(_('No such page.'),$code=404);
}
return true;
diff --git a/actions/revokerole.php b/actions/revokerole.php
index b78c1c25a..c67b70fda 100644
--- a/actions/revokerole.php
+++ b/actions/revokerole.php
@@ -59,11 +59,11 @@ class RevokeRoleAction extends ProfileFormAction
$this->role = $this->arg('role');
if (!Profile_role::isValid($this->role)) {
- $this->clientError(_("Invalid role."));
+ $this->clientError(_('Invalid role.'));
return false;
}
if (!Profile_role::isSettable($this->role)) {
- $this->clientError(_("This role is reserved and cannot be set."));
+ $this->clientError(_('This role is reserved and cannot be set.'));
return false;
}
@@ -72,7 +72,7 @@ class RevokeRoleAction extends ProfileFormAction
assert(!empty($cur)); // checked by parent
if (!$cur->hasRight(Right::REVOKEROLE)) {
- $this->clientError(_("You cannot revoke user roles on this site."));
+ $this->clientError(_('You cannot revoke user roles on this site.'));
return false;
}
diff --git a/actions/sandbox.php b/actions/sandbox.php
index 5b034ff07..d1ef4c86b 100644
--- a/actions/sandbox.php
+++ b/actions/sandbox.php
@@ -62,14 +62,14 @@ class SandboxAction extends ProfileFormAction
assert(!empty($cur)); // checked by parent
if (!$cur->hasRight(Right::SANDBOXUSER)) {
- $this->clientError(_("You cannot sandbox users on this site."));
+ $this->clientError(_('You cannot sandbox users on this site.'));
return false;
}
assert(!empty($this->profile)); // checked by parent
if ($this->profile->isSandboxed()) {
- $this->clientError(_("User is already sandboxed."));
+ $this->clientError(_('User is already sandboxed.'));
return false;
}
diff --git a/actions/showfavorites.php b/actions/showfavorites.php
index 5b85de683..4d776ef04 100644
--- a/actions/showfavorites.php
+++ b/actions/showfavorites.php
@@ -135,7 +135,7 @@ class ShowfavoritesAction extends OwnerDesignAction
if($this->page > 1 && $this->notice->N == 0){
// TRANS: Server error when page not found (404)
- $this->serverError(_('No such page'),$code=404);
+ $this->serverError(_('No such page.'),$code=404);
}
return true;
diff --git a/actions/shownotice.php b/actions/shownotice.php
index a23027f7c..7be9618f8 100644
--- a/actions/shownotice.php
+++ b/actions/shownotice.php
@@ -97,7 +97,7 @@ class ShownoticeAction extends OwnerDesignAction
$this->profile = $this->notice->getProfile();
if (empty($this->profile)) {
- $this->serverError(_('Notice has no profile'), 500);
+ $this->serverError(_('Notice has no profile.'), 500);
return false;
}
diff --git a/actions/silence.php b/actions/silence.php
index 206e5ba87..09cc480d9 100644
--- a/actions/silence.php
+++ b/actions/silence.php
@@ -62,14 +62,14 @@ class SilenceAction extends ProfileFormAction
assert(!empty($cur)); // checked by parent
if (!$cur->hasRight(Right::SILENCEUSER)) {
- $this->clientError(_("You cannot silence users on this site."));
+ $this->clientError(_('You cannot silence users on this site.'));
return false;
}
assert(!empty($this->profile)); // checked by parent
if ($this->profile->isSilenced()) {
- $this->clientError(_("User is already silenced."));
+ $this->clientError(_('User is already silenced.'));
return false;
}
diff --git a/actions/siteadminpanel.php b/actions/siteadminpanel.php
index e5482987f..4238b3e85 100644
--- a/actions/siteadminpanel.php
+++ b/actions/siteadminpanel.php
@@ -130,7 +130,7 @@ class SiteadminpanelAction extends AdminPanelAction
// Validate site name
if (empty($values['site']['name'])) {
- $this->clientError(_("Site name must have non-zero length."));
+ $this->clientError(_('Site name must have non-zero length.'));
}
// Validate email
@@ -168,7 +168,7 @@ class SiteadminpanelAction extends AdminPanelAction
// Validate dupe limit
if (!Validate::number($values['site']['dupelimit'], array('min' => 1))) {
- $this->clientError(_("Dupe limit must 1 or more seconds."));
+ $this->clientError(_("Dupe limit must be one or more seconds."));
}
}
diff --git a/actions/sitenoticeadminpanel.php b/actions/sitenoticeadminpanel.php
index a68cc699c..bdcaa2355 100644
--- a/actions/sitenoticeadminpanel.php
+++ b/actions/sitenoticeadminpanel.php
@@ -110,7 +110,7 @@ class SitenoticeadminpanelAction extends AdminPanelAction
if (mb_strlen($siteNotice) > 255) {
$this->clientError(
- _('Max length for the site-wide notice is 255 chars')
+ _('Max length for the site-wide notice is 255 chars.')
);
}
diff --git a/actions/snapshotadminpanel.php b/actions/snapshotadminpanel.php
index a0c2315bc..df6b168dc 100644
--- a/actions/snapshotadminpanel.php
+++ b/actions/snapshotadminpanel.php
@@ -124,13 +124,13 @@ class SnapshotadminpanelAction extends AdminPanelAction
// Validate snapshot run value
if (!in_array($values['snapshot']['run'], array('web', 'cron', 'never'))) {
- $this->clientError(_("Invalid snapshot run value."));
+ $this->clientError(_('Invalid snapshot run value.'));
}
// Validate snapshot frequency value
if (!Validate::number($values['snapshot']['frequency'])) {
- $this->clientError(_("Snapshot frequency must be a number."));
+ $this->clientError(_('Snapshot frequency must be a number.'));
}
// Validate report URL
@@ -141,7 +141,7 @@ class SnapshotadminpanelAction extends AdminPanelAction
array('allowed_schemes' => array('http', 'https')
)
)) {
- $this->clientError(_("Invalid snapshot report URL."));
+ $this->clientError(_('Invalid snapshot report URL.'));
}
}
}
diff --git a/actions/subscribers.php b/actions/subscribers.php
index 6f1520b3f..2845a498e 100644
--- a/actions/subscribers.php
+++ b/actions/subscribers.php
@@ -157,9 +157,13 @@ class SubscribersListItem extends SubscriptionListItem
$user = common_current_user();
if (!empty($user) && $this->owner->id == $user->id) {
- $bf = new BlockForm($this->out, $this->profile,
- array('action' => 'subscribers',
- 'nickname' => $this->owner->nickname));
+ $returnto = array('action' => 'subscribers',
+ 'nickname' => $this->owner->nickname);
+ $page = $this->out->arg('page');
+ if ($page) {
+ $returnto['param-page'] = $page;
+ }
+ $bf = new BlockForm($this->out, $this->profile, $returnto);
$bf->show();
}
}
diff --git a/actions/tag.php b/actions/tag.php
index ee9617b66..953240404 100644
--- a/actions/tag.php
+++ b/actions/tag.php
@@ -49,7 +49,7 @@ class TagAction extends Action
if($this->page > 1 && $this->notice->N == 0){
// TRANS: Server error when page not found (404)
- $this->serverError(_('No such page'),$code=404);
+ $this->serverError(_('No such page.'),$code=404);
}
return true;
diff --git a/actions/unsandbox.php b/actions/unsandbox.php
index 22f4d8e76..d50b5072e 100644
--- a/actions/unsandbox.php
+++ b/actions/unsandbox.php
@@ -62,14 +62,14 @@ class UnsandboxAction extends ProfileFormAction
assert(!empty($cur)); // checked by parent
if (!$cur->hasRight(Right::SANDBOXUSER)) {
- $this->clientError(_("You cannot sandbox users on this site."));
+ $this->clientError(_('You cannot sandbox users on this site.'));
return false;
}
assert(!empty($this->profile)); // checked by parent
if (!$this->profile->isSandboxed()) {
- $this->clientError(_("User is not sandboxed."));
+ $this->clientError(_('User is not sandboxed.'));
return false;
}
diff --git a/actions/unsilence.php b/actions/unsilence.php
index 9ff1b828b..7d282c366 100644
--- a/actions/unsilence.php
+++ b/actions/unsilence.php
@@ -62,14 +62,14 @@ class UnsilenceAction extends ProfileFormAction
assert(!empty($cur)); // checked by parent
if (!$cur->hasRight(Right::SILENCEUSER)) {
- $this->clientError(_("You cannot silence users on this site."));
+ $this->clientError(_('You cannot silence users on this site.'));
return false;
}
assert(!empty($this->profile)); // checked by parent
if (!$this->profile->isSilenced()) {
- $this->clientError(_("User is not silenced."));
+ $this->clientError(_('User is not silenced.'));
return false;
}
diff --git a/actions/unsubscribe.php b/actions/unsubscribe.php
index 6bb10d448..57ca15d68 100644
--- a/actions/unsubscribe.php
+++ b/actions/unsubscribe.php
@@ -74,7 +74,7 @@ class UnsubscribeAction extends Action
$other_id = $this->arg('unsubscribeto');
if (!$other_id) {
- $this->clientError(_('No profile id in request.'));
+ $this->clientError(_('No profile ID in request.'));
return;
}
diff --git a/actions/userauthorization.php b/actions/userauthorization.php
index 7f71c60db..e896ff96c 100644
--- a/actions/userauthorization.php
+++ b/actions/userauthorization.php
@@ -69,7 +69,7 @@ class UserauthorizationAction extends Action
$profile = $user->getProfile();
if (!$profile) {
common_log_db_error($user, 'SELECT', __FILE__);
- $this->serverError(_('User without matching profile'));
+ $this->serverError(_('User without matching profile.'));
return;
}
diff --git a/actions/userrss.php b/actions/userrss.php
index e03eb9356..cf7d18ca8 100644
--- a/actions/userrss.php
+++ b/actions/userrss.php
@@ -103,7 +103,7 @@ class UserrssAction extends Rss10Action
$profile = $user->getProfile();
if (!$profile) {
common_log_db_error($user, 'SELECT', __FILE__);
- $this->serverError(_('User without matching profile'));
+ $this->serverError(_('User without matching profile.'));
return null;
}
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);