Merge remote-tracking branch 'mainline/1.0.x' into people_tags_rebase
Conflicts: actions/tagother.php lib/subscriberspeopleselftagcloudsection.php lib/subscriptionspeopleselftagcloudsection.php
This commit is contained in:
commit
57198a7464
@ -66,6 +66,7 @@ class ApiAccountRateLimitStatusAction extends ApiBareAuthAction
|
||||
|
||||
if (!in_array($this->format, array('xml', 'json'))) {
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
|
@ -88,7 +88,7 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
|
||||
|
||||
if (!in_array($this->format, array('xml', 'json'))) {
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed handling a non-existing API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
|
@ -90,7 +90,7 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
|
||||
|
||||
if (!in_array($this->format, array('xml', 'json'))) {
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
|
@ -88,7 +88,7 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
|
||||
|
||||
if (!in_array($this->format, array('xml', 'json'))) {
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
|
@ -111,7 +111,7 @@ class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
|
||||
|
||||
if (!in_array($this->format, array('xml', 'json'))) {
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed trying to execute an unknown API method updating profile colours.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
|
@ -64,7 +64,7 @@ class ApiAccountVerifyCredentialsAction extends ApiAuthAction
|
||||
parent::handle($args);
|
||||
|
||||
if (!in_array($this->format, array('xml', 'json'))) {
|
||||
// TRANS: Client error displayed trying to execute an unknown API method verifying user credentials.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
$this->clientError(_('API method not found.'), $code = 404);
|
||||
return;
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ class ApiDirectMessageAction extends ApiAuthAction
|
||||
$this->showJsonDirectMessages();
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client error given when an API method was not found (404).
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
$this->clientError(_('API method not found.'), $code = 404);
|
||||
break;
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction
|
||||
|
||||
if (!in_array($this->format, array('xml', 'json'))) {
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
|
@ -94,7 +94,7 @@ class ApiFavoriteDestroyAction extends ApiAuthAction
|
||||
|
||||
if (!in_array($this->format, array('xml', 'json'))) {
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
|
@ -95,7 +95,7 @@ class ApiFriendshipsCreateAction extends ApiAuthAction
|
||||
|
||||
if (!in_array($this->format, array('xml', 'json'))) {
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
|
@ -95,7 +95,7 @@ class ApiFriendshipsDestroyAction extends ApiAuthAction
|
||||
|
||||
if (!in_array($this->format, array('xml', 'json'))) {
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
|
@ -120,7 +120,7 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction
|
||||
parent::handle($args);
|
||||
|
||||
if (!in_array($this->format, array('xml', 'json'))) {
|
||||
// TRANS: Client error displayed trying to execute an unknown API method showing friendship.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
$this->clientError(_('API method not found.'), 404);
|
||||
return;
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ class ApiGroupCreateAction extends ApiAuthAction
|
||||
break;
|
||||
default:
|
||||
$this->clientError(
|
||||
// TRANS: Client error given when an API method was not found (404).
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
|
@ -111,7 +111,7 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction
|
||||
break;
|
||||
default:
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed trying to execute an unknown API method showing group membership.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
400,
|
||||
$this->format
|
||||
|
@ -144,7 +144,7 @@ class ApiGroupJoinAction extends ApiAuthAction
|
||||
break;
|
||||
default:
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed trying to execute an unknown API method joining a group.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
|
@ -134,7 +134,7 @@ class ApiGroupLeaveAction extends ApiAuthAction
|
||||
break;
|
||||
default:
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed trying to execute an unknown API method leaving a group.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
|
@ -67,6 +67,7 @@ class ApiGroupListAction extends ApiBareAuthAction
|
||||
$this->user = $this->getTargetUser(null);
|
||||
|
||||
if (empty($this->user)) {
|
||||
// TRANS: Client error displayed when user not found for an action.
|
||||
$this->clientError(_('No such user.'), 404, $this->format);
|
||||
return false;
|
||||
}
|
||||
@ -130,7 +131,7 @@ class ApiGroupListAction extends ApiBareAuthAction
|
||||
break;
|
||||
default:
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed trying to execute an unknown API method checking group membership.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
|
@ -116,7 +116,7 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction
|
||||
break;
|
||||
default:
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed trying to execute an unknown API method listing the latest 20 groups.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
|
@ -101,7 +101,7 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction
|
||||
break;
|
||||
default:
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed trying to execute an unknown API method showing group membership.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
|
@ -85,6 +85,7 @@ class ApiGroupProfileUpdateAction extends ApiAuthAction
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
|
||||
$this->clientError(
|
||||
// TRANS: Client error message. POST is a HTTP command. It should not be translated.
|
||||
_('This method requires a POST.'),
|
||||
400, $this->format
|
||||
);
|
||||
@ -93,7 +94,7 @@ class ApiGroupProfileUpdateAction extends ApiAuthAction
|
||||
|
||||
if (!in_array($this->format, array('xml', 'json'))) {
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed when using an unsupported API format.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
@ -211,7 +212,7 @@ class ApiGroupProfileUpdateAction extends ApiAuthAction
|
||||
$this->showSingleJsonGroup($this->group);
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client error displayed when using an unsupported API format.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
$this->clientError(_('API method not found.'), 404, $this->format);
|
||||
break;
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ class ApiGroupShowAction extends ApiPrivateAuthAction
|
||||
$this->showSingleJsonGroup($this->group);
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client error displayed trying to execute an unknown API method showing a group.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
$this->clientError(_('API method not found.'), 404, $this->format);
|
||||
break;
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ class ApiHelpTestAction extends ApiPrivateAuthAction
|
||||
$this->endDocument('json');
|
||||
} else {
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed trying to execute an unknown API method testing API connectivity.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
|
@ -97,7 +97,7 @@ class ApiStatusesDestroyAction extends ApiAuthAction
|
||||
|
||||
if (!in_array($this->format, array('xml', 'json'))) {
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed trying to execute an unknown API method deleting a status.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404
|
||||
);
|
||||
|
@ -106,7 +106,7 @@ class ApiStatusesRetweetsAction extends ApiAuthAction
|
||||
$this->showJsonTimeline($strm);
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
$this->clientError(_('API method not found.'), $code = 404);
|
||||
break;
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
|
||||
parent::handle($args);
|
||||
|
||||
if (!in_array($this->format, array('xml', 'json', 'atom'))) {
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
$this->clientError(_('API method not found.'), 404);
|
||||
return;
|
||||
}
|
||||
|
@ -239,8 +239,8 @@ class ApiStatusesUpdateAction extends ApiAuthAction
|
||||
|
||||
$this->clientError(
|
||||
sprintf(
|
||||
// TRANS: Client error displayed when the parameter "status" is missing.
|
||||
// TRANS: %d is the maximum number of character for a notice.
|
||||
// TRANS: Client error displayed exceeding the maximum notice length.
|
||||
// TRANS: %d is the maximum length for a notice.
|
||||
_m('That\'s too long. Maximum notice size is %d character.',
|
||||
'That\'s too long. Maximum notice size is %d characters.',
|
||||
Notice::maxContent()),
|
||||
|
@ -135,7 +135,7 @@ class ApiStatusnetConfigAction extends ApiAction
|
||||
break;
|
||||
default:
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
|
@ -87,7 +87,7 @@ class ApiStatusnetVersionAction extends ApiPrivateAuthAction
|
||||
break;
|
||||
default:
|
||||
$this->clientError(
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
_('API method not found.'),
|
||||
404,
|
||||
$this->format
|
||||
|
@ -105,7 +105,7 @@ class ApiSubscriptionsAction extends ApiBareAuthAction
|
||||
parent::handle($args);
|
||||
|
||||
if (!in_array($this->format, array('xml', 'json'))) {
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
$this->clientError(_('API method not found.'), $code = 404);
|
||||
return;
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction
|
||||
$this->raw($doc->asString());
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
$this->clientError(_('API method not found.'), $code = 404);
|
||||
break;
|
||||
}
|
||||
|
@ -204,6 +204,8 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction
|
||||
$profile = $this->user->getProfile();
|
||||
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
|
||||
$sitename = common_config('site', 'name');
|
||||
// TRANS: Title of API timeline for a user and friends.
|
||||
// TRANS: %s is a username.
|
||||
$title = sprintf(_("%s and friends"), $this->user->nickname);
|
||||
$taguribase = TagURI::base();
|
||||
$id = "tag:$taguribase:FriendsTimeline:" . $this->user->id;
|
||||
@ -272,7 +274,7 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction
|
||||
$this->raw($doc->asString());
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
$this->clientError(_('API method not found.'), $code = 404);
|
||||
break;
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ class ApiTimelineHomeAction extends ApiBareAuthAction
|
||||
$this->raw($doc->asString());
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
$this->clientError(_('API method not found.'), $code = 404);
|
||||
break;
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction
|
||||
$this->raw($doc->asString());
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
$this->clientError(_('API method not found.'), $code = 404);
|
||||
break;
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction
|
||||
$this->raw($doc->asString());
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
$this->clientError(_('API method not found.'), $code = 404);
|
||||
break;
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ class ApiTimelineRetweetedToMeAction extends ApiAuthAction
|
||||
$this->raw($doc->asString());
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
$this->clientError(_('API method not found.'), $code = 404);
|
||||
break;
|
||||
}
|
||||
|
@ -101,6 +101,8 @@ class ApiTimelineRetweetsOfMeAction extends ApiAuthAction
|
||||
$profile = $this->auth_user->getProfile();
|
||||
|
||||
$subtitle = sprintf(
|
||||
// TRANS: Subtitle of API time with retweets of me.
|
||||
// TRANS: %1$s is the StatusNet sitename, %2$s is the user nickname, %3$s is the user profile name.
|
||||
_('%1$s notices that %2$s / %3$s has repeated.'),
|
||||
$sitename, $this->auth_user->nickname, $profile->getBestName()
|
||||
);
|
||||
@ -143,7 +145,7 @@ class ApiTimelineRetweetsOfMeAction extends ApiAuthAction
|
||||
$this->raw($doc->asString());
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
$this->clientError(_('API method not found.'), 404);
|
||||
break;
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ class ApiTimelineTagAction extends ApiPrivateAuthAction
|
||||
$this->raw($doc->asString());
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
$this->clientError(_('API method not found.'), $code = 404);
|
||||
break;
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
|
||||
$this->raw($doc->asString());
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
$this->clientError(_('API method not found.'), $code = 404);
|
||||
break;
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ class ApiUserShowAction extends ApiPrivateAuthAction
|
||||
}
|
||||
|
||||
if (!in_array($this->format, array('xml', 'json'))) {
|
||||
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||
// TRANS: Client error displayed when coming across a non-supported API method.
|
||||
$this->clientError(_('API method not found.'), $code = 404);
|
||||
return;
|
||||
}
|
||||
|
@ -277,6 +277,7 @@ class AvatarsettingsAction extends SettingsAction
|
||||
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->showForm(_('There was a problem with your session token. '.
|
||||
'Try again, please.'));
|
||||
return;
|
||||
|
@ -53,7 +53,7 @@ class CancelsubscriptionAction extends Action
|
||||
StatusNet::setApi(true);
|
||||
}
|
||||
if (!common_logged_in()) {
|
||||
// TRANS: Client error displayed when trying to leave a group while not logged in.
|
||||
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
|
||||
$this->clientError(_('Not logged in.'));
|
||||
return;
|
||||
}
|
||||
@ -71,6 +71,7 @@ class CancelsubscriptionAction extends Action
|
||||
$token = $this->trimmed('token');
|
||||
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->clientError(_('There was a problem with your session token. ' .
|
||||
'Try again, please.'));
|
||||
return;
|
||||
|
@ -99,6 +99,7 @@ class DeleteapplicationAction extends Action
|
||||
// CSRF protection
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->clientError(_('There was a problem with your session token.'));
|
||||
return;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ class DeletenoticeAction extends Action
|
||||
$this->user = common_current_user();
|
||||
|
||||
if (!$this->user) {
|
||||
// TRANS: Error message displayed trying to delete a notice while not logged in.
|
||||
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
|
||||
common_user_error(_('Not logged in.'));
|
||||
exit;
|
||||
}
|
||||
@ -174,6 +174,7 @@ class DeletenoticeAction extends Action
|
||||
$token = $this->trimmed('token');
|
||||
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->showForm(_('There was a problem with your session token. ' .
|
||||
'Try again, please.'));
|
||||
return;
|
||||
|
@ -57,7 +57,7 @@ class DisfavorAction extends Action
|
||||
{
|
||||
parent::handle($args);
|
||||
if (!common_logged_in()) {
|
||||
// TRANS: Client error displayed when trying to remove a favorite while not logged in.
|
||||
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
|
||||
$this->clientError(_('Not logged in.'));
|
||||
return;
|
||||
}
|
||||
|
@ -128,6 +128,7 @@ class EditApplicationAction extends OwnerDesignAction
|
||||
// CSRF protection
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->clientError(_('There was a problem with your session token.'));
|
||||
return;
|
||||
}
|
||||
|
@ -289,6 +289,7 @@ class EmailsettingsAction extends SettingsAction
|
||||
// CSRF protection
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->show_form(_('There was a problem with your session token. '.
|
||||
'Try again, please.'));
|
||||
return;
|
||||
@ -322,7 +323,6 @@ class EmailsettingsAction extends SettingsAction
|
||||
$user = common_current_user();
|
||||
|
||||
if (Event::handle('StartEmailSaveForm', array($this, &$user))) {
|
||||
|
||||
$emailnotifysub = $this->boolean('emailnotifysub');
|
||||
$emailnotifyfav = $this->boolean('emailnotifyfav');
|
||||
$emailnotifymsg = $this->boolean('emailnotifymsg');
|
||||
|
@ -58,7 +58,7 @@ class FavorAction extends Action
|
||||
{
|
||||
parent::handle($args);
|
||||
if (!common_logged_in()) {
|
||||
// TRANS: Client error displayed when trying to mark a notice as favorite without being logged in.
|
||||
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
|
||||
$this->clientError(_('Not logged in.'));
|
||||
return;
|
||||
}
|
||||
@ -72,6 +72,7 @@ class FavorAction extends Action
|
||||
$notice = Notice::staticGet($id);
|
||||
$token = $this->trimmed('token-'.$notice->id);
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->clientError(_('There was a problem with your session token. Try again, please.'));
|
||||
return;
|
||||
}
|
||||
|
@ -52,6 +52,7 @@ class GeocodeAction extends Action
|
||||
parent::prepare($args);
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->clientError(_('There was a problem with your session token. '.
|
||||
'Try again, please.'));
|
||||
}
|
||||
|
@ -56,12 +56,13 @@ class GroupblockAction extends RedirectingAction
|
||||
{
|
||||
parent::prepare($args);
|
||||
if (!common_logged_in()) {
|
||||
// TRANS: Client error displayed trying to block a user from a group while not logged in.
|
||||
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
|
||||
$this->clientError(_('Not logged in.'));
|
||||
return false;
|
||||
}
|
||||
$token = $this->trimmed('token');
|
||||
if (empty($token) || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->clientError(_('There was a problem with your session token. Try again, please.'));
|
||||
return;
|
||||
}
|
||||
|
@ -56,12 +56,13 @@ class GroupunblockAction extends Action
|
||||
{
|
||||
parent::prepare($args);
|
||||
if (!common_logged_in()) {
|
||||
// TRANS: Client error displayed when trying to unblock a user from a group while not logged in.
|
||||
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
|
||||
$this->clientError(_('Not logged in.'));
|
||||
return false;
|
||||
}
|
||||
$token = $this->trimmed('token');
|
||||
if (empty($token) || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->clientError(_('There was a problem with your session token. Try again, please.'));
|
||||
return;
|
||||
}
|
||||
|
@ -240,6 +240,7 @@ class ImsettingsAction extends SettingsAction
|
||||
// CSRF protection
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->showForm(_('There was a problem with your session token. '.
|
||||
'Try again, please.'));
|
||||
return;
|
||||
|
@ -57,6 +57,7 @@ class InviteAction extends CurrentUserDesignAction
|
||||
// CSRF protection
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->showForm(_('There was a problem with your session token. Try again, please.'));
|
||||
return;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ class LogoutAction extends Action
|
||||
{
|
||||
parent::handle($args);
|
||||
if (!common_logged_in()) {
|
||||
// TRANS: Client error displayed trying to log out when not logged in.
|
||||
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
|
||||
$this->clientError(_('Not logged in.'));
|
||||
} else {
|
||||
if (Event::handle('StartLogout', array($this))) {
|
||||
|
@ -58,12 +58,13 @@ class MakeadminAction extends RedirectingAction
|
||||
{
|
||||
parent::prepare($args);
|
||||
if (!common_logged_in()) {
|
||||
// TRANS: Client error displayed when trying to access the "make admin" page while not logged in.
|
||||
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
|
||||
$this->clientError(_('Not logged in.'));
|
||||
return false;
|
||||
}
|
||||
$token = $this->trimmed('token');
|
||||
if (empty($token) || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->clientError(_('There was a problem with your session token. Try again, please.'));
|
||||
return;
|
||||
}
|
||||
|
@ -109,6 +109,7 @@ class NewApplicationAction extends OwnerDesignAction
|
||||
// CSRF protection
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->clientError(_('There was a problem with your session token.'));
|
||||
return;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ class NewmessageAction extends Action
|
||||
parent::handle($args);
|
||||
|
||||
if (!common_logged_in()) {
|
||||
// TRANS: Client error displayed trying to create a new direct message while not logged in.
|
||||
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
|
||||
$this->clientError(_('Not logged in.'), 403);
|
||||
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
$this->saveNewMessage();
|
||||
@ -137,6 +137,7 @@ class NewmessageAction extends Action
|
||||
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->showForm(_('There was a problem with your session token. ' .
|
||||
'Try again, please.'));
|
||||
return;
|
||||
|
@ -64,7 +64,7 @@ class NewnoticeAction extends Action
|
||||
function title()
|
||||
{
|
||||
// TRANS: Page title for sending a new notice.
|
||||
return _('New notice');
|
||||
return _m('TITLE','New notice');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -83,7 +83,7 @@ class NewnoticeAction extends Action
|
||||
function handle($args)
|
||||
{
|
||||
if (!common_logged_in()) {
|
||||
// TRANS: Client error displayed trying to send a notice while not logged in.
|
||||
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
|
||||
$this->clientError(_('Not logged in.'));
|
||||
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
// check for this before token since all POST and FILES data
|
||||
@ -101,6 +101,7 @@ class NewnoticeAction extends Action
|
||||
// CSRF protection
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->clientError(_('There was a problem with your session token. '.
|
||||
'Try again, please.'));
|
||||
}
|
||||
@ -180,6 +181,8 @@ class NewnoticeAction extends Action
|
||||
|
||||
if (Notice::contentTooLong($content_shortened)) {
|
||||
$upload->delete();
|
||||
// TRANS: Client error displayed exceeding the maximum notice length.
|
||||
// TRANS: %d is the maximum length for a notice.
|
||||
$this->clientError(sprintf(_m('Maximum notice size is %d character, including attachment URL.',
|
||||
'Maximum notice size is %d characters, including attachment URL.',
|
||||
Notice::maxContent()),
|
||||
@ -286,7 +289,8 @@ class NewnoticeAction extends Action
|
||||
{
|
||||
$this->startHTML('text/xml;charset=utf-8', true);
|
||||
$this->elementStart('head');
|
||||
$this->element('title', null, _('New notice'));
|
||||
// TRANS: Title for form to send a new notice.
|
||||
$this->element('title', null, _m('TITLE','New notice'));
|
||||
$this->elementEnd('head');
|
||||
$this->elementStart('body');
|
||||
|
||||
|
@ -60,7 +60,7 @@ class NudgeAction extends Action
|
||||
parent::handle($args);
|
||||
|
||||
if (!common_logged_in()) {
|
||||
// TRANS: Client error displayed trying to nudge a user without being logged in.
|
||||
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
|
||||
$this->clientError(_('Not logged in.'));
|
||||
return;
|
||||
}
|
||||
@ -78,6 +78,7 @@ class NudgeAction extends Action
|
||||
$token = $this->trimmed('token');
|
||||
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->clientError(_('There was a problem with your session token. Try again, please.'));
|
||||
return;
|
||||
}
|
||||
|
@ -132,6 +132,7 @@ class OauthconnectionssettingsAction extends SettingsAction
|
||||
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->showForm(_('There was a problem with your session token. '.
|
||||
'Try again, please.'));
|
||||
return;
|
||||
|
@ -143,6 +143,7 @@ class PasswordsettingsAction extends SettingsAction
|
||||
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->showForm(_('There was a problem with your session token. '.
|
||||
'Try again, please.'));
|
||||
return;
|
||||
|
@ -84,6 +84,7 @@ class PluginEnableAction extends Action
|
||||
$token = $this->trimmed('token');
|
||||
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->clientError(_('There was a problem with your session token.'.
|
||||
' Try again, please.'));
|
||||
return false;
|
||||
@ -94,7 +95,7 @@ class PluginEnableAction extends Action
|
||||
$this->user = common_current_user();
|
||||
|
||||
if (empty($this->user)) {
|
||||
// TRANS: Client error displayed when trying to enable or disable a plugin while not logged in.
|
||||
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
|
||||
$this->clientError(_('Not logged in.'));
|
||||
return false;
|
||||
}
|
||||
|
@ -203,6 +203,13 @@ class ProfilesettingsAction extends SettingsAction
|
||||
(empty($user->subscribe_policy)) ? User::SUBSCRIBE_POLICY_OPEN : $user->subscribe_policy);
|
||||
$this->elementEnd('li');
|
||||
}
|
||||
$this->elementStart('li');
|
||||
$this->checkbox('private_stream',
|
||||
// TRANS: Checkbox label in profile settings.
|
||||
_('Make updates visible only to my followers'),
|
||||
($this->arg('private_stream')) ?
|
||||
$this->boolean('private_stream') : $user->private_stream);
|
||||
$this->elementEnd('li');
|
||||
$this->elementEnd('ul');
|
||||
// TRANS: Button to save input in profile settings.
|
||||
$this->submit('save', _m('BUTTON','Save'));
|
||||
@ -245,6 +252,7 @@ class ProfilesettingsAction extends SettingsAction
|
||||
$location = $this->trimmed('location');
|
||||
$autosubscribe = $this->boolean('autosubscribe');
|
||||
$subscribe_policy = $this->trimmed('subscribe_policy');
|
||||
$private_stream = $this->boolean('private_stream');
|
||||
$language = $this->trimmed('language');
|
||||
$timezone = $this->trimmed('timezone');
|
||||
$tagstring = $this->trimmed('tags');
|
||||
@ -350,11 +358,14 @@ class ProfilesettingsAction extends SettingsAction
|
||||
}
|
||||
|
||||
// XXX: XOR
|
||||
if (($user->autosubscribe ^ $autosubscribe) || $user->subscribe_policy != $subscribe_policy) {
|
||||
if (($user->autosubscribe ^ $autosubscribe) ||
|
||||
($user->private_stream ^ $private_stream) ||
|
||||
($user->subscribe_policy != $subscribe_policy)) {
|
||||
|
||||
$original = clone($user);
|
||||
|
||||
$user->autosubscribe = $autosubscribe;
|
||||
$user->private_stream = $private_stream;
|
||||
$user->subscribe_policy = $subscribe_policy;
|
||||
|
||||
$result = $user->update($original);
|
||||
|
@ -160,6 +160,7 @@ class RegisterAction extends Action
|
||||
if (Event::handle('StartRegistrationTry', array($this))) {
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->showForm(_('There was a problem with your session token. '.
|
||||
'Try again, please.'));
|
||||
return;
|
||||
@ -211,6 +212,7 @@ class RegisterAction extends Action
|
||||
// TRANS: Form validation error displayed when trying to register with an invalid nickname.
|
||||
$this->showForm(_('Not a valid nickname.'));
|
||||
} else if ($this->emailExists($email)) {
|
||||
// TRANS: Form validation error displayed when trying to register with an already registered e-mail address.
|
||||
$this->showForm(_('Email address already exists.'));
|
||||
} else if (!is_null($homepage) && (strlen($homepage) > 0) &&
|
||||
!Validate::uri($homepage,
|
||||
|
@ -74,6 +74,7 @@ class RemotesubscribeAction extends Action
|
||||
/* Use a session token for CSRF protection. */
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->showForm(_('There was a problem with your session token. '.
|
||||
'Try again, please.'));
|
||||
return;
|
||||
|
@ -76,6 +76,7 @@ class RepeatAction extends Action
|
||||
$token = $this->trimmed('token-'.$id);
|
||||
|
||||
if (empty($token) || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->clientError(_('There was a problem with your session token. Try again, please.'));
|
||||
return false;
|
||||
}
|
||||
|
@ -113,6 +113,7 @@ class ShowApplicationAction extends OwnerDesignAction
|
||||
// CSRF protection
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->clientError(_('There was a problem with your session token.'));
|
||||
return;
|
||||
}
|
||||
|
@ -67,11 +67,11 @@ class ShowstreamAction extends ProfileAction
|
||||
if ($this->page == 1) {
|
||||
// TRANS: Page title showing tagged notices in one user's stream.
|
||||
// TRANS: %1$s is the username, %2$s is the hash tag.
|
||||
return sprintf(_('%1$s tagged %2$s'), $base, $this->tag);
|
||||
return sprintf(_('Notices by %1$s tagged %2$s'), $base, $this->tag);
|
||||
} else {
|
||||
// TRANS: Page title showing tagged notices in one user's stream.
|
||||
// TRANS: %1$s is the username, %2$s is the hash tag, %3$d is the page number.
|
||||
return sprintf(_('%1$s tagged %2$s, page %3$d'), $base, $this->tag, $this->page);
|
||||
return sprintf(_('Notices by %1$s tagged %2$s, page %3$d'), $base, $this->tag, $this->page);
|
||||
}
|
||||
} else {
|
||||
if ($this->page == 1) {
|
||||
@ -79,7 +79,7 @@ class ShowstreamAction extends ProfileAction
|
||||
} else {
|
||||
// TRANS: Extended page title showing tagged notices in one user's stream.
|
||||
// TRANS: %1$s is the username, %2$d is the page number.
|
||||
return sprintf(_('%1$s, page %2$d'),
|
||||
return sprintf(_('Notices by %1$s, page %2$d'),
|
||||
$base,
|
||||
$this->page);
|
||||
}
|
||||
|
@ -246,6 +246,7 @@ class SmssettingsAction extends SettingsAction
|
||||
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->showForm(_('There was a problem with your session token. '.
|
||||
'Try again, please.'));
|
||||
return;
|
||||
|
@ -29,7 +29,7 @@ class SubeditAction extends Action
|
||||
parent::prepare($args);
|
||||
|
||||
if (!common_logged_in()) {
|
||||
// TRANS: Client error displayed trying a change a subscription while not logged in.
|
||||
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
|
||||
$this->clientError(_('Not logged in.'));
|
||||
return false;
|
||||
}
|
||||
@ -37,6 +37,7 @@ class SubeditAction extends Action
|
||||
$token = $this->trimmed('token');
|
||||
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->clientError(_('There was a problem with your session token. '.
|
||||
'Try again, please.'));
|
||||
return false;
|
||||
|
@ -94,7 +94,7 @@ class SubscribeAction extends Action
|
||||
$this->user = common_current_user();
|
||||
|
||||
if (empty($this->user)) {
|
||||
// TRANS: Client error displayed trying to subscribe when not logged in.
|
||||
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
|
||||
$this->clientError(_('Not logged in.'));
|
||||
return false;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ class UnsubscribeAction extends Action
|
||||
{
|
||||
parent::handle($args);
|
||||
if (!common_logged_in()) {
|
||||
// TRANS: Client error displayed when trying to unsubscribe while not logged in.
|
||||
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
|
||||
$this->clientError(_('Not logged in.'));
|
||||
return;
|
||||
}
|
||||
@ -66,6 +66,7 @@ class UnsubscribeAction extends Action
|
||||
$token = $this->trimmed('token');
|
||||
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->clientError(_('There was a problem with your session token. ' .
|
||||
'Try again, please.'));
|
||||
return;
|
||||
|
@ -167,6 +167,7 @@ class UrlsettingsAction extends SettingsAction
|
||||
// CSRF protection
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->showForm(_('There was a problem with your session token. '.
|
||||
'Try again, please.'));
|
||||
return;
|
||||
|
@ -54,7 +54,7 @@ class UseradminpanelAction extends AdminPanelAction
|
||||
*/
|
||||
function title()
|
||||
{
|
||||
// TRANS: User admin panel title
|
||||
// TRANS: User admin panel title.
|
||||
return _m('TITLE', 'User');
|
||||
}
|
||||
|
||||
@ -172,6 +172,7 @@ class UseradminpanelAction extends AdminPanelAction
|
||||
}
|
||||
}
|
||||
|
||||
// @todo FIXME: Class documentation missing.
|
||||
class UserAdminPanelForm extends AdminForm
|
||||
{
|
||||
/**
|
||||
@ -212,7 +213,8 @@ class UserAdminPanelForm extends AdminForm
|
||||
function formData()
|
||||
{
|
||||
$this->out->elementStart('fieldset', array('id' => 'settings_user-profile'));
|
||||
$this->out->element('legend', null, _('Profile'));
|
||||
// TRANS: Fieldset legend in user administration panel.
|
||||
$this->out->element('legend', null, _m('LEGEND','Profile'));
|
||||
$this->out->elementStart('ul', 'form_data');
|
||||
|
||||
$this->li();
|
||||
|
@ -50,6 +50,7 @@ class UserauthorizationAction extends Action
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
$srv = $this->getStoredParams();
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->showForm($srv->getRemoteUser(), _('There was a problem ' .
|
||||
'with your session token. Try again, ' .
|
||||
'please.'));
|
||||
|
@ -37,6 +37,7 @@ class UserrssAction extends Rss10Action
|
||||
$this->tag = $this->trimmed('tag');
|
||||
|
||||
if (!$this->user) {
|
||||
// TRANS: Client error displayed when user not found for an action.
|
||||
$this->clientError(_('No such user.'));
|
||||
return false;
|
||||
} else {
|
||||
@ -105,6 +106,7 @@ class UserrssAction extends Rss10Action
|
||||
$profile = $user->getProfile();
|
||||
if (!$profile) {
|
||||
common_log_db_error($user, 'SELECT', __FILE__);
|
||||
// TRANS: Server error displayed in user RSS when user does not have a matching profile.
|
||||
$this->serverError(_('User without matching profile.'));
|
||||
return null;
|
||||
}
|
||||
|
@ -56,6 +56,7 @@ class UserxrdAction extends XrdAction
|
||||
}
|
||||
|
||||
if (!$this->user) {
|
||||
// TRANS: Client error displayed when user not found for an action.
|
||||
$this->clientError(_('No such user.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
@ -351,6 +351,7 @@ class Notice extends Memcached_DataObject
|
||||
$repeat = Notice::staticGet('id', $repeat_of);
|
||||
|
||||
if (empty($repeat)) {
|
||||
// TRANS: Client exception thrown in notice when trying to repeat a missing or deleted notice.
|
||||
throw new ClientException(_('Cannot repeat; original notice is missing or deleted.'));
|
||||
}
|
||||
|
||||
@ -420,6 +421,18 @@ class Notice extends Memcached_DataObject
|
||||
$notice->scope = $scope;
|
||||
}
|
||||
|
||||
// For private streams
|
||||
|
||||
$user = $profile->getUser();
|
||||
|
||||
if (!empty($user)) {
|
||||
if ($user->private_stream &&
|
||||
($notice->scope == Notice::PUBLIC_SCOPE ||
|
||||
$notice->scope == Notice::SITE_SCOPE)) {
|
||||
$notice->scope |= Notice::FOLLOWER_SCOPE;
|
||||
}
|
||||
}
|
||||
|
||||
if (Event::handle('StartNoticeSave', array(&$notice))) {
|
||||
|
||||
// XXX: some of these functions write to the DB
|
||||
|
@ -63,6 +63,7 @@ class User extends Memcached_DataObject
|
||||
public $inboxed; // tinyint(1)
|
||||
public $design_id; // int(4)
|
||||
public $viewdesigns; // tinyint(1) default_1
|
||||
public $private_stream; // tinyint(1) default_0
|
||||
public $created; // datetime() not_null
|
||||
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
|
||||
|
||||
|
@ -633,6 +633,7 @@ urlshorteningservice = 2
|
||||
inboxed = 17
|
||||
design_id = 1
|
||||
viewdesigns = 17
|
||||
private_stream = 17
|
||||
created = 142
|
||||
modified = 384
|
||||
|
||||
|
@ -123,6 +123,7 @@ $schema['user'] = array(
|
||||
'inboxed' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'has an inbox been created for this user?'),
|
||||
'design_id' => array('type' => 'int', 'description' => 'id of a design'),
|
||||
'viewdesigns' => array('type' => 'int', 'size' => 'tiny', 'default' => 1, 'description' => 'whether to view user-provided designs'),
|
||||
'private_stream' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'whether to limit all notices to followers only'),
|
||||
|
||||
'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
|
||||
'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
|
||||
@ -725,6 +726,7 @@ $schema['user_group'] = array(
|
||||
'uri' => array('type' => 'varchar', 'length' => 255, 'description' => 'universal identifier'),
|
||||
'mainpage' => array('type' => 'varchar', 'length' => 255, 'description' => 'page for group info to link to'),
|
||||
'join_policy' => array('type' => 'int', 'size' => 'tiny', 'description' => '0=open; 1=requires admin approval'),
|
||||
'force_scope' => array('type' => 'int', 'size' => 'tiny', 'description' => '0=never,1=sometimes,-1=always'),
|
||||
),
|
||||
'primary key' => array('id'),
|
||||
'unique keys' => array(
|
||||
|
21
index.php
21
index.php
@ -106,20 +106,20 @@ function handleError($error)
|
||||
$_cur = null;
|
||||
|
||||
$msg = sprintf(
|
||||
_(
|
||||
'The database for %s isn\'t responding correctly, '.
|
||||
'so the site won\'t work properly. '.
|
||||
// TRANS: Database error message.
|
||||
_('The database for %1$s is not responding correctly, '.
|
||||
'so the site will not work properly. '.
|
||||
'The site admins probably know about the problem, '.
|
||||
'but you can contact them at %s to make sure. '.
|
||||
'but you can contact them at %2$s to make sure. '.
|
||||
'Otherwise, wait a few minutes and try again.'
|
||||
),
|
||||
common_config('site', 'name'),
|
||||
common_config('site', 'email')
|
||||
);
|
||||
} else {
|
||||
$msg = _(
|
||||
'An important error occured, probably related to email setup. '.
|
||||
'Check logfiles for more info..'
|
||||
// TRANS: Error message.
|
||||
$msg = _('An important error occured, probably related to email setup. '.
|
||||
'Check logfiles for more info.'
|
||||
);
|
||||
}
|
||||
|
||||
@ -127,6 +127,7 @@ function handleError($error)
|
||||
$dac->showPage();
|
||||
|
||||
} catch (Exception $e) {
|
||||
// TRANS: Error message.
|
||||
echo _('An error occurred.');
|
||||
}
|
||||
exit(-1);
|
||||
@ -250,8 +251,8 @@ function main()
|
||||
|
||||
if (!_have_config()) {
|
||||
$msg = sprintf(
|
||||
_(
|
||||
"No configuration file found. Try running ".
|
||||
// TRANS: Error message displayed when there is no StatusNet configuration file.
|
||||
_("No configuration file found. Try running ".
|
||||
"the installation program first."
|
||||
)
|
||||
);
|
||||
@ -281,6 +282,7 @@ function main()
|
||||
$args = $r->map($path);
|
||||
|
||||
if (!$args) {
|
||||
// TRANS: Error message displayed when trying to access a non-existing page.
|
||||
$cac = new ClientErrorAction(_('Unknown page'), 404);
|
||||
$cac->showPage();
|
||||
return;
|
||||
@ -335,6 +337,7 @@ function main()
|
||||
$action_class = ucfirst($action).'Action';
|
||||
|
||||
if (!class_exists($action_class)) {
|
||||
// TRANS: Error message displayed when trying to perform an undefined action.
|
||||
$cac = new ClientErrorAction(_('Unknown action'), 404);
|
||||
$cac->showPage();
|
||||
} else {
|
||||
|
@ -165,7 +165,7 @@ class Action extends HTMLOutputter // lawsuit
|
||||
{
|
||||
$this->element('title', null,
|
||||
// TRANS: Page title. %1$s is the title, %2$s is the site name.
|
||||
sprintf(_("%1\$s - %2\$s"),
|
||||
sprintf(_('%1$s - %2$s'),
|
||||
$this->title(),
|
||||
common_config('site', 'name')));
|
||||
}
|
||||
@ -181,7 +181,7 @@ class Action extends HTMLOutputter // lawsuit
|
||||
function title()
|
||||
{
|
||||
// TRANS: Page title for a page without a title set.
|
||||
return _("Untitled page");
|
||||
return _('Untitled page');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -615,17 +615,16 @@ class Action extends HTMLOutputter // lawsuit
|
||||
*/
|
||||
function showNoticeForm()
|
||||
{
|
||||
$tabs = array('status' => _('Status'));
|
||||
// TRANS: Tab on the notice form.
|
||||
$tabs = array('status' => _m('TAB','Status'));
|
||||
|
||||
$this->elementStart('div', 'input_forms');
|
||||
|
||||
if (Event::handle('StartShowEntryForms', array(&$tabs))) {
|
||||
|
||||
$this->elementStart('ul', array('class' => 'nav',
|
||||
'id' => 'input_form_nav'));
|
||||
|
||||
foreach ($tabs as $tag => $title) {
|
||||
|
||||
$attrs = array('id' => 'input_form_nav_'.$tag,
|
||||
'class' => 'input_form_nav_tab');
|
||||
|
||||
@ -653,7 +652,6 @@ class Action extends HTMLOutputter // lawsuit
|
||||
$this->elementEnd('div');
|
||||
|
||||
foreach ($tabs as $tag => $title) {
|
||||
|
||||
$attrs = array('class' => 'input_form',
|
||||
'id' => 'input_form_'.$tag);
|
||||
|
||||
|
@ -704,11 +704,18 @@ class Activity
|
||||
return ActivityUtils::child($element, $tag, $namespace);
|
||||
}
|
||||
|
||||
/**
|
||||
* For consistency, we'll always output UTC rather than local time.
|
||||
* Note that clients *should* accept any timezone we give them as long
|
||||
* as it's properly formatted.
|
||||
*
|
||||
* @param int $tm Unix timestamp
|
||||
* @return string
|
||||
*/
|
||||
static function iso8601Date($tm)
|
||||
{
|
||||
$dateStr = date('d F Y H:i:s', $tm);
|
||||
$d = new DateTime($dateStr, new DateTimeZone('UTC'));
|
||||
$d->setTimezone(new DateTimeZone(common_timezone()));
|
||||
return $d->format('c');
|
||||
}
|
||||
}
|
||||
|
@ -81,7 +81,8 @@ class ActivityMover extends QueueHandler
|
||||
function moveActivity($act, $sink, $user, $remote)
|
||||
{
|
||||
if (empty($user)) {
|
||||
throw new Exception(sprintf(_("No such user %s."),$act->actor->id));
|
||||
// TRANS: Exception thrown if no user is provided. %s is a user ID.
|
||||
throw new Exception(sprintf(_('No such user "%s".'),$act->actor->id));
|
||||
}
|
||||
|
||||
switch ($act->verb) {
|
||||
|
@ -67,7 +67,7 @@ class AdminPanelAction extends Action
|
||||
// User must be logged in.
|
||||
|
||||
if (!common_logged_in()) {
|
||||
// TRANS: Client error message thrown when trying to access the admin panel while not logged in.
|
||||
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
|
||||
$this->clientError(_('Not logged in.'));
|
||||
return false;
|
||||
}
|
||||
|
@ -45,7 +45,6 @@ if (!defined('STATUSNET')) {
|
||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class AdminPanelNav extends Menu
|
||||
{
|
||||
/**
|
||||
@ -62,11 +61,15 @@ class AdminPanelNav extends Menu
|
||||
|
||||
// Stub section w/ home link
|
||||
$this->action->elementStart('ul');
|
||||
$this->action->element('h3', null, _('Home'));
|
||||
// TRANS: Header in administrator navigation panel.
|
||||
$this->action->element('h3', null, _m('HEADER','Home'));
|
||||
$this->action->elementStart('ul', 'nav');
|
||||
$this->out->menuItem(common_local_url('all', array('nickname' =>
|
||||
$nickname)),
|
||||
_('Home'),
|
||||
// TRANS: Menu item in administrator navigation panel.
|
||||
_m('MENU','Home'),
|
||||
// TRANS: Menu item title in administrator navigation panel.
|
||||
// TRANS: %s is a username.
|
||||
sprintf(_('%s and friends'), $name),
|
||||
$this->action == 'all', 'nav_timeline_personal');
|
||||
|
||||
@ -74,88 +77,89 @@ class AdminPanelNav extends Menu
|
||||
$this->action->elementEnd('ul');
|
||||
|
||||
$this->action->elementStart('ul');
|
||||
$this->action->element('h3', null, _('Admin'));
|
||||
// TRANS: Header in administrator navigation panel.
|
||||
$this->action->element('h3', null, _m('HEADER','Admin'));
|
||||
$this->action->elementStart('ul', array('class' => 'nav'));
|
||||
|
||||
if (Event::handle('StartAdminPanelNav', array($this))) {
|
||||
|
||||
if (AdminPanelAction::canAdmin('site')) {
|
||||
// TRANS: Menu item title/tooltip
|
||||
// TRANS: Menu item title in administrator navigation panel.
|
||||
$menu_title = _('Basic site configuration');
|
||||
// TRANS: Menu item for site administration
|
||||
// TRANS: Menu item in administrator navigation panel.
|
||||
$this->out->menuItem(common_local_url('siteadminpanel'), _m('MENU', 'Site'),
|
||||
$menu_title, $action_name == 'siteadminpanel', 'nav_site_admin_panel');
|
||||
}
|
||||
|
||||
if (AdminPanelAction::canAdmin('design')) {
|
||||
// TRANS: Menu item title/tooltip
|
||||
// TRANS: Menu item title in administrator navigation panel.
|
||||
$menu_title = _('Design configuration');
|
||||
// TRANS: Menu item for site administration
|
||||
// TRANS: Menu item in administrator navigation panel.
|
||||
$this->out->menuItem(common_local_url('designadminpanel'), _m('MENU', 'Design'),
|
||||
$menu_title, $action_name == 'designadminpanel', 'nav_design_admin_panel');
|
||||
}
|
||||
|
||||
if (AdminPanelAction::canAdmin('user')) {
|
||||
// TRANS: Menu item title/tooltip
|
||||
// TRANS: Menu item title in administrator navigation panel.
|
||||
$menu_title = _('User configuration');
|
||||
// TRANS: Menu item for site administration
|
||||
$this->out->menuItem(common_local_url('useradminpanel'), _('User'),
|
||||
// TRANS: Menu item in administrator navigation panel.
|
||||
$this->out->menuItem(common_local_url('useradminpanel'), _m('MENU','User'),
|
||||
$menu_title, $action_name == 'useradminpanel', 'nav_user_admin_panel');
|
||||
}
|
||||
|
||||
if (AdminPanelAction::canAdmin('access')) {
|
||||
// TRANS: Menu item title/tooltip
|
||||
// TRANS: Menu item title in administrator navigation panel.
|
||||
$menu_title = _('Access configuration');
|
||||
// TRANS: Menu item for site administration
|
||||
$this->out->menuItem(common_local_url('accessadminpanel'), _('Access'),
|
||||
// TRANS: Menu item in administrator navigation panel.
|
||||
$this->out->menuItem(common_local_url('accessadminpanel'), _m('MENU','Access'),
|
||||
$menu_title, $action_name == 'accessadminpanel', 'nav_access_admin_panel');
|
||||
}
|
||||
|
||||
if (AdminPanelAction::canAdmin('paths')) {
|
||||
// TRANS: Menu item title/tooltip
|
||||
// TRANS: Menu item title in administrator navigation panel.
|
||||
$menu_title = _('Paths configuration');
|
||||
// TRANS: Menu item for site administration
|
||||
$this->out->menuItem(common_local_url('pathsadminpanel'), _('Paths'),
|
||||
// TRANS: Menu item in administrator navigation panel.
|
||||
$this->out->menuItem(common_local_url('pathsadminpanel'), _m('MENU','Paths'),
|
||||
$menu_title, $action_name == 'pathsadminpanel', 'nav_paths_admin_panel');
|
||||
}
|
||||
|
||||
if (AdminPanelAction::canAdmin('sessions')) {
|
||||
// TRANS: Menu item title/tooltip
|
||||
// TRANS: Menu item title in administrator navigation panel.
|
||||
$menu_title = _('Sessions configuration');
|
||||
// TRANS: Menu item for site administration
|
||||
$this->out->menuItem(common_local_url('sessionsadminpanel'), _('Sessions'),
|
||||
// TRANS: Menu item in administrator navigation panel.
|
||||
$this->out->menuItem(common_local_url('sessionsadminpanel'), _m('MENU','Sessions'),
|
||||
$menu_title, $action_name == 'sessionsadminpanel', 'nav_sessions_admin_panel');
|
||||
}
|
||||
|
||||
if (AdminPanelAction::canAdmin('sitenotice')) {
|
||||
// TRANS: Menu item title/tooltip
|
||||
// TRANS: Menu item title in administrator navigation panel.
|
||||
$menu_title = _('Edit site notice');
|
||||
// TRANS: Menu item for site administration
|
||||
$this->out->menuItem(common_local_url('sitenoticeadminpanel'), _('Site notice'),
|
||||
// TRANS: Menu item in administrator navigation panel.
|
||||
$this->out->menuItem(common_local_url('sitenoticeadminpanel'), _m('MENU','Site notice'),
|
||||
$menu_title, $action_name == 'sitenoticeadminpanel', 'nav_sitenotice_admin_panel');
|
||||
}
|
||||
|
||||
if (AdminPanelAction::canAdmin('snapshot')) {
|
||||
// TRANS: Menu item title/tooltip
|
||||
// TRANS: Menu item title in administrator navigation panel.
|
||||
$menu_title = _('Snapshots configuration');
|
||||
// TRANS: Menu item for site administration
|
||||
$this->out->menuItem(common_local_url('snapshotadminpanel'), _('Snapshots'),
|
||||
// TRANS: Menu item in administrator navigation panel.
|
||||
$this->out->menuItem(common_local_url('snapshotadminpanel'), _m('MENU','Snapshots'),
|
||||
$menu_title, $action_name == 'snapshotadminpanel', 'nav_snapshot_admin_panel');
|
||||
}
|
||||
|
||||
if (AdminPanelAction::canAdmin('license')) {
|
||||
// TRANS: Menu item title/tooltip
|
||||
// TRANS: Menu item title in administrator navigation panel.
|
||||
$menu_title = _('Set site license');
|
||||
// TRANS: Menu item for site administration
|
||||
$this->out->menuItem(common_local_url('licenseadminpanel'), _('License'),
|
||||
// TRANS: Menu item in administrator navigation panel.
|
||||
$this->out->menuItem(common_local_url('licenseadminpanel'), _m('MENU','License'),
|
||||
$menu_title, $action_name == 'licenseadminpanel', 'nav_license_admin_panel');
|
||||
}
|
||||
|
||||
if (AdminPanelAction::canAdmin('plugins')) {
|
||||
// TRANS: Menu item title/tooltip
|
||||
// TRANS: Menu item title in administrator navigation panel.
|
||||
$menu_title = _('Plugins configuration');
|
||||
// TRANS: Menu item for site administration
|
||||
$this->out->menuItem(common_local_url('pluginsadminpanel'), _('Plugins'),
|
||||
// TRANS: Menu item in administrator navigation panel.
|
||||
$this->out->menuItem(common_local_url('pluginsadminpanel'), _m('MENU','Plugins'),
|
||||
$menu_title, $action_name == 'pluginsadminpanel', 'nav_design_admin_panel');
|
||||
}
|
||||
|
||||
|
@ -199,6 +199,7 @@ class ApiAuthAction extends ApiAction
|
||||
$user = User::staticGet('id', $appUser->profile_id);
|
||||
if (!empty($user)) {
|
||||
if (!$user->hasRight(Right::API)) {
|
||||
// TRANS: Authorization exception thrown when a user without API access tries to access the API.
|
||||
throw new AuthorizationException(_('Not allowed to use API.'));
|
||||
}
|
||||
}
|
||||
@ -225,7 +226,7 @@ class ApiAuthAction extends ApiAction
|
||||
throw new OAuthException(_('Bad access token.'));
|
||||
}
|
||||
} else {
|
||||
// Also should not happen
|
||||
// Also should not happen.
|
||||
// TRANS: OAuth exception given when no user was found for a given token (no token was found).
|
||||
throw new OAuthException(_('No user for that token.'));
|
||||
}
|
||||
@ -281,6 +282,7 @@ class ApiAuthAction extends ApiAction
|
||||
|
||||
if (!empty($user)) {
|
||||
if (!$user->hasRight(Right::API)) {
|
||||
// TRANS: Authorization exception thrown when a user without API access tries to access the API.
|
||||
throw new AuthorizationException(_('Not allowed to use API.'));
|
||||
}
|
||||
$this->auth_user = $user;
|
||||
|
@ -21,6 +21,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
|
||||
require_once INSTALLDIR . '/lib/oauthstore.php';
|
||||
|
||||
// @todo FIXME: Class documentation missing.
|
||||
class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
|
||||
{
|
||||
function lookup_consumer($consumerKey)
|
||||
@ -90,7 +91,7 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
|
||||
);
|
||||
|
||||
if (empty($req_token)) {
|
||||
common_debug("couldn't get request token from oauth datastore");
|
||||
common_debug("Couldn't get request token from oauth datastore");
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -312,8 +313,8 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
|
||||
if (!$result) {
|
||||
common_log_db_error($appUser, 'INSERT', __FILE__);
|
||||
|
||||
// TRANS: Server error displayed when a database error occurs.
|
||||
throw new Exception(
|
||||
// TRANS: Exception thrown when a database error occurs.
|
||||
_('Database error inserting OAuth application user.')
|
||||
);
|
||||
}
|
||||
@ -340,8 +341,8 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
|
||||
|
||||
if (!$result) {
|
||||
common_log_db_error($appUser, 'UPDATE', __FILE__);
|
||||
// TRANS: Server error displayed when a database error occurs.
|
||||
throw new Exception(
|
||||
// TRANS: Exception thrown when a database error occurs.
|
||||
_('Database error updating OAuth application user.')
|
||||
);
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ class ApplicationEditForm extends Form
|
||||
if ($maxDesc > 0) {
|
||||
// TRANS: Form input field instructions.
|
||||
// TRANS: %d is the number of available characters for the description.
|
||||
$descInstr = sprintf(ngettext('Describe your application in %d character','Describe your application in %d characters',$maxDesc),
|
||||
$descInstr = sprintf(_m('Describe your application in %d character','Describe your application in %d characters',$maxDesc),
|
||||
$maxDesc);
|
||||
} else {
|
||||
// TRANS: Form input field instructions.
|
||||
|
@ -237,13 +237,16 @@ class ConnectedAppsList extends Widget
|
||||
$this->out->elementEnd('a');
|
||||
|
||||
if ($app->name == 'anonymous') {
|
||||
$this->out->element('span', 'fn', "Unknown application");
|
||||
// TRANS: Name for an anonymous application in application list.
|
||||
$this->out->element('span', 'fn', _('Unknown application'));
|
||||
}
|
||||
|
||||
$this->out->elementEnd('span');
|
||||
|
||||
if ($app->name != 'anonymous') {
|
||||
// @todo FIXME: i18n trouble.
|
||||
// TRANS: Message has a leading space and a trailing space. Used in application list.
|
||||
// TRANS: Before this message the application name is put, behind it the organisation that manages it.
|
||||
$this->out->raw(_(' by '));
|
||||
|
||||
$this->out->element(
|
||||
@ -267,6 +270,7 @@ class ConnectedAppsList extends Widget
|
||||
// TRANS: Used in application list. %1$s is a modified date, %2$s is access type ("read-write" or "read-only")
|
||||
$txt = sprintf(_('Approved %1$s - "%2$s" access.'), $modifiedDate, $access);
|
||||
|
||||
// @todo FIXME: i18n trouble.
|
||||
$this->out->raw(" - $txt");
|
||||
if (!empty($app->description)) {
|
||||
$this->out->element(
|
||||
@ -294,7 +298,7 @@ class ConnectedAppsList extends Widget
|
||||
$this->out->elementStart('fieldset');
|
||||
$this->out->hidden('oauth_token', $this->connection->token);
|
||||
$this->out->hidden('token', common_session_token());
|
||||
// TRANS: Button label
|
||||
// TRANS: Button label in application list to revoke access to user data.
|
||||
$this->out->submit('revoke', _m('BUTTON','Revoke'));
|
||||
$this->out->elementEnd('fieldset');
|
||||
$this->out->elementEnd('form');
|
||||
|
@ -108,8 +108,8 @@ class Atom10Feed extends XMLStringer
|
||||
if (!empty($name)) {
|
||||
$xs->element('name', null, $name);
|
||||
} else {
|
||||
// TRANS: Atom feed exception thrown when an author element does not contain a name element.
|
||||
throw new Atom10FeedException(
|
||||
// TRANS: Atom feed exception thrown when an author element does not contain a name element.
|
||||
_('Author element must contain a name element.')
|
||||
);
|
||||
}
|
||||
|
@ -922,7 +922,7 @@ class SubscriptionsCommand extends Command
|
||||
// TRANS: Text shown after requesting other users a user is subscribed to.
|
||||
// TRANS: This message supports plural forms. This message is followed by a
|
||||
// TRANS: hard coded space and a comma separated list of subscribed users.
|
||||
$out = ngettext('You are subscribed to this person:',
|
||||
$out = _m('You are subscribed to this person:',
|
||||
'You are subscribed to these people:',
|
||||
count($nicknames));
|
||||
$out .= ' ';
|
||||
@ -949,7 +949,7 @@ class SubscribersCommand extends Command
|
||||
// TRANS: Text shown after requesting other users that are subscribed to a user (followers).
|
||||
// TRANS: This message supports plural forms. This message is followed by a
|
||||
// TRANS: hard coded space and a comma separated list of subscribing users.
|
||||
$out = ngettext('This person is subscribed to you:',
|
||||
$out = _m('This person is subscribed to you:',
|
||||
'These people are subscribed to you:',
|
||||
count($nicknames));
|
||||
$out .= ' ';
|
||||
@ -976,7 +976,7 @@ class GroupsCommand extends Command
|
||||
// TRANS: Text shown after requesting groups a user is subscribed to.
|
||||
// TRANS: This message supports plural forms. This message is followed by a
|
||||
// TRANS: hard coded space and a comma separated list of subscribed groups.
|
||||
$out = ngettext('You are a member of this group:',
|
||||
$out = _m('You are a member of this group:',
|
||||
'You are a member of these groups:',
|
||||
count($nicknames));
|
||||
$out.=implode(', ',$groups);
|
||||
|
@ -56,6 +56,7 @@ class DBErrorAction extends ServerErrorAction
|
||||
|
||||
function title()
|
||||
{
|
||||
// TRANS: Page title for when a database error occurs.
|
||||
return _('Database error');
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,6 @@ if (!defined('STATUSNET')) {
|
||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class DefaultLocalNav extends Menu
|
||||
{
|
||||
function show()
|
||||
@ -55,11 +54,13 @@ class DefaultLocalNav extends Menu
|
||||
|
||||
if (!empty($user)) {
|
||||
$pn = new PersonalGroupNav($this->action);
|
||||
$this->submenu(_m('Home'), $pn);
|
||||
// TRANS: Menu item in default local navigation panel.
|
||||
$this->submenu(_m('MENU','Home'), $pn);
|
||||
}
|
||||
|
||||
$bn = new PublicGroupNav($this->action);
|
||||
$this->submenu(_('Public'), $bn);
|
||||
// TRANS: Menu item in default local navigation panel.
|
||||
$this->submenu(_m('MENU','Public'), $bn);
|
||||
|
||||
$this->action->elementEnd('ul');
|
||||
}
|
||||
|
@ -47,13 +47,11 @@ if (!defined('STATUSNET')) {
|
||||
* @see UnsubscribeForm
|
||||
* @fixme merge a bunch of this stuff with similar form types to reduce boilerplate
|
||||
*/
|
||||
|
||||
class DeleteGroupForm extends Form
|
||||
{
|
||||
/**
|
||||
* group for user to delete
|
||||
*/
|
||||
|
||||
var $group = null;
|
||||
|
||||
/**
|
||||
@ -62,7 +60,6 @@ class DeleteGroupForm extends Form
|
||||
* @param HTMLOutputter $out output channel
|
||||
* @param group $group group to join
|
||||
*/
|
||||
|
||||
function __construct($out=null, $group=null)
|
||||
{
|
||||
parent::__construct($out);
|
||||
@ -75,7 +72,6 @@ class DeleteGroupForm extends Form
|
||||
*
|
||||
* @return string ID of the form
|
||||
*/
|
||||
|
||||
function id()
|
||||
{
|
||||
return 'group-delete-' . $this->group->id;
|
||||
@ -86,7 +82,6 @@ class DeleteGroupForm extends Form
|
||||
*
|
||||
* @return string of the form class
|
||||
*/
|
||||
|
||||
function formClass()
|
||||
{
|
||||
return 'form_group_delete';
|
||||
@ -97,7 +92,6 @@ class DeleteGroupForm extends Form
|
||||
*
|
||||
* @return string URL of the action
|
||||
*/
|
||||
|
||||
function action()
|
||||
{
|
||||
return common_local_url('deletegroup',
|
||||
@ -115,9 +109,9 @@ class DeleteGroupForm extends Form
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function formActions()
|
||||
{
|
||||
$this->out->submit('submit', _('Delete'));
|
||||
// TRANS: Button text for deleting a group.
|
||||
$this->out->submit('submit', _m('BUTTON','Delete'));
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||
* @link http://status.net/
|
||||
*
|
||||
*/
|
||||
|
||||
class DesignForm extends Form
|
||||
{
|
||||
/**
|
||||
@ -62,7 +61,6 @@ class DesignForm extends Form
|
||||
* @param Design $design initial design
|
||||
* @param Design $actionurl url of action (for form posting)
|
||||
*/
|
||||
|
||||
function __construct($out, $design, $actionurl)
|
||||
{
|
||||
parent::__construct($out);
|
||||
@ -76,7 +74,6 @@ class DesignForm extends Form
|
||||
*
|
||||
* @return int ID of the form
|
||||
*/
|
||||
|
||||
function id()
|
||||
{
|
||||
return 'design';
|
||||
@ -87,7 +84,6 @@ class DesignForm extends Form
|
||||
*
|
||||
* @return string class of the form
|
||||
*/
|
||||
|
||||
function formClass()
|
||||
{
|
||||
return 'form_design';
|
||||
@ -98,7 +94,6 @@ class DesignForm extends Form
|
||||
*
|
||||
* @return string URL of the action
|
||||
*/
|
||||
|
||||
function action()
|
||||
{
|
||||
return $this->actionurl;
|
||||
@ -111,6 +106,7 @@ class DesignForm extends Form
|
||||
*/
|
||||
function formLegend()
|
||||
{
|
||||
// TRANS: Form legend of form for changing the page design.
|
||||
$this->out->element('legend', null, _('Change design'));
|
||||
}
|
||||
|
||||
@ -119,7 +115,6 @@ class DesignForm extends Form
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function formData()
|
||||
{
|
||||
$this->backgroundData();
|
||||
@ -137,7 +132,7 @@ class DesignForm extends Form
|
||||
// TRANS: Button text on profile design page to immediately reset all colour settings to default.
|
||||
$this->out->submit('defaults', _('Use defaults'), 'submit form_action-default',
|
||||
// TRANS: Title for button on profile design page to reset all colour settings to default.
|
||||
'defaults', _('Restore default designs'));
|
||||
'defaults', _('Restore default designs.'));
|
||||
|
||||
$this->out->element('input', array('id' => 'settings_design_reset',
|
||||
'type' => 'reset',
|
||||
@ -145,7 +140,7 @@ class DesignForm extends Form
|
||||
'value' => _m('BUTTON', 'Reset'),
|
||||
'class' => 'submit form_action-primary',
|
||||
// TRANS: Title for button on profile design page to reset all colour settings to default without saving.
|
||||
'title' => _('Reset back to default')));
|
||||
'title' => _('Reset back to default.')));
|
||||
}
|
||||
|
||||
function backgroundData()
|
||||
@ -161,7 +156,7 @@ class DesignForm extends Form
|
||||
'id' => 'design_background-image_file'));
|
||||
// TRANS: Instructions for form on profile design page.
|
||||
$this->out->element('p', 'form_guide', _('You can upload your personal ' .
|
||||
'background image. The maximum file size is 2Mb.'));
|
||||
'background image. The maximum file size is 2MB.'));
|
||||
$this->out->element('input', array('name' => 'MAX_FILE_SIZE',
|
||||
'type' => 'hidden',
|
||||
'id' => 'MAX_FILE_SIZE',
|
||||
@ -319,6 +314,6 @@ class DesignForm extends Form
|
||||
// TRANS: Button text on profile design page to save settings.
|
||||
$this->out->submit('save', _m('BUTTON','Save'), 'submit form_action-secondary',
|
||||
// TRANS: Title for button on profile design page to save settings.
|
||||
'save', _('Save design'));
|
||||
'save', _('Save design.'));
|
||||
}
|
||||
}
|
||||
|
@ -119,6 +119,7 @@ class DesignSettingsAction extends SettingsAction
|
||||
// CSRF protection
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Client error displayed when the session token does not match or is not given.
|
||||
$this->showForm(_('There was a problem with your session token. '.
|
||||
'Try again, please.'));
|
||||
return;
|
||||
@ -213,7 +214,7 @@ class DesignSettingsAction extends SettingsAction
|
||||
if ($result === false) {
|
||||
common_log_db_error($design, 'UPDATE', __FILE__);
|
||||
// TRANS: Error message displayed if design settings could not be saved.
|
||||
$this->showForm(_('Couldn\'t update your design.'));
|
||||
$this->showForm(_('Could not update your design.'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -235,7 +236,7 @@ class DesignSettingsAction extends SettingsAction
|
||||
if ($result === false) {
|
||||
common_log_db_error($design, 'DELETE', __FILE__);
|
||||
// TRANS: Error message displayed if design settings could not be saved after clicking "Use defaults".
|
||||
$this->showForm(_('Couldn\'t update your design.'));
|
||||
$this->showForm(_('Could not update your design.'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -81,12 +81,16 @@ class Feed
|
||||
{
|
||||
switch ($this->type) {
|
||||
case Feed::RSS1:
|
||||
// TRANS: Feed type name.
|
||||
return _('RSS 1.0');
|
||||
case Feed::RSS2:
|
||||
// TRANS: Feed type name.
|
||||
return _('RSS 2.0');
|
||||
case Feed::ATOM:
|
||||
// TRANS: Feed type name.
|
||||
return _('Atom');
|
||||
case Feed::FOAF:
|
||||
// TRANS: Feed type name. FOAF stands for Friend of a Friend.
|
||||
return _('FOAF');
|
||||
default:
|
||||
return null;
|
||||
|
@ -47,7 +47,6 @@ if (!defined('STATUSNET')) {
|
||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class FeedImporter extends QueueHandler
|
||||
{
|
||||
/**
|
||||
@ -55,7 +54,6 @@ class FeedImporter extends QueueHandler
|
||||
*
|
||||
* @return string identifier for this queue handler
|
||||
*/
|
||||
|
||||
public function transport()
|
||||
{
|
||||
return 'feedimp';
|
||||
@ -72,13 +70,15 @@ class FeedImporter extends QueueHandler
|
||||
|
||||
if ($feed->namespaceURI != Activity::ATOM ||
|
||||
$feed->localName != 'feed') {
|
||||
throw new ClientException(_("Not an atom feed."));
|
||||
// TRANS: Client exception thrown when an imported feed is not an Atom feed.
|
||||
throw new ClientException(_("Not an Atom feed."));
|
||||
}
|
||||
|
||||
|
||||
$author = ActivityUtils::getFeedAuthor($feed);
|
||||
|
||||
if (empty($author)) {
|
||||
// TRANS: Client exception thrown when an imported feed does not have an author.
|
||||
throw new ClientException(_("No author in the feed."));
|
||||
}
|
||||
|
||||
@ -86,7 +86,9 @@ class FeedImporter extends QueueHandler
|
||||
if ($trusted) {
|
||||
$user = $this->userFromAuthor($author);
|
||||
} else {
|
||||
throw new ClientException(_("Can't import without a user."));
|
||||
// TRANS: Client exception thrown when an imported feed does not have an author that
|
||||
// TRANS: can be associated with a user.
|
||||
throw new ClientException(_("Cannot import without a user."));
|
||||
}
|
||||
}
|
||||
|
||||
@ -127,7 +129,6 @@ class FeedImporter extends QueueHandler
|
||||
/**
|
||||
* Sort activities oldest-first
|
||||
*/
|
||||
|
||||
static function activitySort($a, $b)
|
||||
{
|
||||
if ($a->time == $b->time) {
|
||||
@ -154,7 +155,7 @@ class FeedImporter extends QueueHandler
|
||||
$profile = $user->getProfile();
|
||||
Ostatus_profile::updateProfile($profile, $author);
|
||||
|
||||
// FIXME: Update avatar
|
||||
// @todo FIXME: Update avatar
|
||||
return $user;
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ require_once INSTALLDIR.'/lib/profilelist.php';
|
||||
|
||||
define('AVATARS_PER_PAGE', 80);
|
||||
|
||||
// @todo FIXME: Class documentation missing.
|
||||
class GalleryAction extends OwnerDesignAction
|
||||
{
|
||||
var $profile = null;
|
||||
@ -56,6 +57,7 @@ class GalleryAction extends OwnerDesignAction
|
||||
$this->user = User::staticGet('nickname', $nickname);
|
||||
|
||||
if (!$this->user) {
|
||||
// TRANS: Client error displayed when trying to perform a gallery action with an unknown user.
|
||||
$this->clientError(_('No such user.'), 404);
|
||||
return false;
|
||||
}
|
||||
@ -63,6 +65,7 @@ class GalleryAction extends OwnerDesignAction
|
||||
$this->profile = $this->user->getProfile();
|
||||
|
||||
if (!$this->profile) {
|
||||
// TRANS: Server error displayed when trying to perform a gallery action with a user without a profile.
|
||||
$this->serverError(_('User has no profile.'));
|
||||
return false;
|
||||
}
|
||||
@ -125,7 +128,8 @@ class GalleryAction extends OwnerDesignAction
|
||||
common_local_url($this->trimmed('action'),
|
||||
array('nickname' =>
|
||||
$this->user->nickname))),
|
||||
_('All'));
|
||||
// TRANS: List element on gallery action page to show all tags.
|
||||
_m('TAGS','All'));
|
||||
$this->elementEnd('li');
|
||||
$this->elementStart('li', array('id'=>'filter_tags_item'));
|
||||
$this->elementStart('form', array('name' => 'bytag',
|
||||
@ -133,11 +137,15 @@ class GalleryAction extends OwnerDesignAction
|
||||
'action' => common_path('?action=' . $this->trimmed('action')),
|
||||
'method' => 'post'));
|
||||
$this->elementStart('fieldset');
|
||||
// TRANS: Fieldset legend on gallery action page.
|
||||
$this->element('legend', null, _('Select tag to filter'));
|
||||
// TRANS: Dropdown field label on gallery action page for a list containing tags.
|
||||
$this->dropdown('tag', _('Tag'), $content,
|
||||
_('Choose a tag to narrow list'), false, $tag);
|
||||
// TRANS: Dropdown field title on gallery action page for a list containing tags.
|
||||
_('Choose a tag to narrow list.'), false, $tag);
|
||||
$this->hidden('nickname', $this->user->nickname);
|
||||
$this->submit('submit', _('Go'));
|
||||
// TRANS: Submit button text on gallery action page.
|
||||
$this->submit('submit', _m('BUTTON','Go'));
|
||||
$this->elementEnd('fieldset');
|
||||
$this->elementEnd('form');
|
||||
$this->elementEnd('li');
|
||||
@ -146,7 +154,6 @@ class GalleryAction extends OwnerDesignAction
|
||||
}
|
||||
|
||||
// Get list of tags we tagged other users with
|
||||
|
||||
function getTags($lst, $usr)
|
||||
{
|
||||
$profile_tag = new Notice_tag();
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user