Merge branch '0.9.x' into testing
This commit is contained in:
commit
9573f725c1
|
@ -331,8 +331,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
|
|||
if (Event::handle('StartAtomPubNewActivity', array(&$activity, $this->user, &$saved))) {
|
||||
|
||||
if ($activity->verb != ActivityVerb::POST) {
|
||||
// TRANS: Client error displayed when not using the POST verb.
|
||||
// TRANS: Do not translate POST.
|
||||
// TRANS: Client error displayed when not using the POST verb. Do not translate POST.
|
||||
$this->clientError(_('Can only handle POST activities.'));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -244,8 +244,7 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
|||
if (Event::handle('StartAtomPubNewActivity', array(&$activity))) {
|
||||
|
||||
if ($activity->verb != ActivityVerb::FOLLOW) {
|
||||
// TRANS: Client error displayed when not using the POST verb.
|
||||
// TRANS: Do not translate POST.
|
||||
// TRANS: Client error displayed when not using the follow verb.
|
||||
$this->clientError(_('Can only handle Follow activities.'));
|
||||
return;
|
||||
}
|
||||
|
@ -264,13 +263,16 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
|||
|
||||
if (empty($profile)) {
|
||||
// TRANS: Client exception thrown when subscribing to a non-existing profile.
|
||||
// TRANS: %s is the unknown profile ID.
|
||||
$this->clientError(sprintf(_('Unknown profile %s.'), $person->id));
|
||||
return;
|
||||
}
|
||||
|
||||
if (Subscription::exists($this->_profile, $profile)) {
|
||||
// 409 Conflict
|
||||
$this->clientError(sprintf(_('Already subscribed to %s'),
|
||||
// TRANS: Client error displayed trying to subscribe to an already subscribed profile.
|
||||
// TRANS: %s is the profile the user already has a subscription on.
|
||||
$this->clientError(sprintf(_('Already subscribed to %s.'),
|
||||
$person->id),
|
||||
409);
|
||||
return;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Disfavor action.
|
||||
*
|
||||
|
|
|
@ -198,6 +198,7 @@ class EditApplicationAction extends OwnerDesignAction
|
|||
} elseif (Oauth_application::descriptionTooLong($description)) {
|
||||
$this->showForm(sprintf(
|
||||
// TRANS: Validation error shown when providing too long a description in the "Edit application" form.
|
||||
// TRANS: %d is the maximum number of allowed characters.
|
||||
_m('Description is too long (maximum %d character).',
|
||||
'Description is too long (maximum %d characters).',
|
||||
Oauth_application::maxDesc()),
|
||||
|
@ -223,6 +224,7 @@ class EditApplicationAction extends OwnerDesignAction
|
|||
$this->showForm(_('Organization is too long (maximum 255 characters).'));
|
||||
return;
|
||||
} elseif (empty($homepage)) {
|
||||
// TRANS: Form validation error show when an organisation name has not been provided in the edit application form.
|
||||
$this->showForm(_('Organization homepage is required.'));
|
||||
return;
|
||||
} elseif ((mb_strlen($homepage) > 0)
|
||||
|
|
|
@ -46,7 +46,6 @@ require_once INSTALLDIR.'/lib/accountsettingsaction.php';
|
|||
*
|
||||
* @see Widget
|
||||
*/
|
||||
|
||||
class EmailsettingsAction extends AccountSettingsAction
|
||||
{
|
||||
/**
|
||||
|
@ -54,7 +53,6 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
*
|
||||
* @return string Title of the page
|
||||
*/
|
||||
|
||||
function title()
|
||||
{
|
||||
// TRANS: Title for e-mail settings.
|
||||
|
@ -66,7 +64,6 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
*
|
||||
* @return instructions for use
|
||||
*/
|
||||
|
||||
function getInstructions()
|
||||
{
|
||||
// XXX: For consistency of parameters in messages, this should be a
|
||||
|
@ -91,7 +88,6 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showContent()
|
||||
{
|
||||
$user = common_current_user();
|
||||
|
@ -118,8 +114,8 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
$confirm = $this->getConfirmation();
|
||||
if ($confirm) {
|
||||
$this->element('p', array('id' => 'form_unconfirmed'), $confirm->address);
|
||||
// TRANS: Form note in e-mail settings form.
|
||||
$this->element('p', array('class' => 'form_note'),
|
||||
// TRANS: Form note in e-mail settings form.
|
||||
_('Awaiting confirmation on this address. '.
|
||||
'Check your inbox (and spam box!) for a message '.
|
||||
'with further instructions.'));
|
||||
|
@ -173,7 +169,7 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
if ($user->incomingemail) {
|
||||
$this->elementStart('p');
|
||||
$this->element('span', 'address', $user->incomingemail);
|
||||
// XXX: Looks a little awkward in the UI.
|
||||
// @todo XXX: Looks a little awkward in the UI.
|
||||
// Something like "xxxx@identi.ca Send email ..". Needs improvement.
|
||||
$this->element('span', 'input_instructions',
|
||||
// TRANS: Form instructions for incoming e-mail form in e-mail settings.
|
||||
|
@ -262,7 +258,6 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
*
|
||||
* @return Confirm_address Email address confirmation for user, or null
|
||||
*/
|
||||
|
||||
function getConfirmation()
|
||||
{
|
||||
$user = common_current_user();
|
||||
|
@ -288,7 +283,6 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handlePost()
|
||||
{
|
||||
// CSRF protection
|
||||
|
@ -322,7 +316,6 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function savePreferences()
|
||||
{
|
||||
$user = common_current_user();
|
||||
|
@ -374,7 +367,6 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function addAddress()
|
||||
{
|
||||
$user = common_current_user();
|
||||
|
@ -393,7 +385,7 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
|
||||
if (!$email) {
|
||||
// TRANS: Message given saving e-mail address that cannot be normalised.
|
||||
$this->showForm(_('Cannot normalize that email address'));
|
||||
$this->showForm(_('Cannot normalize that email address.'));
|
||||
return;
|
||||
}
|
||||
if (!Validate::email($email, common_config('email', 'check_domain'))) {
|
||||
|
@ -442,7 +434,6 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function cancelConfirmation()
|
||||
{
|
||||
$email = $this->arg('email');
|
||||
|
@ -478,7 +469,6 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function removeAddress()
|
||||
{
|
||||
$user = common_current_user();
|
||||
|
@ -519,12 +509,12 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function removeIncoming()
|
||||
{
|
||||
$user = common_current_user();
|
||||
|
||||
if (!$user->incomingemail) {
|
||||
// TRANS: Form validation error displayed when trying to remove an incoming e-mail address while no address has been set.
|
||||
$this->showForm(_('No incoming email address.'));
|
||||
return;
|
||||
}
|
||||
|
@ -549,7 +539,6 @@ class EmailsettingsAction extends AccountSettingsAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function newIncoming()
|
||||
{
|
||||
$user = common_current_user();
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Favor action.
|
||||
*
|
||||
|
@ -59,6 +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.
|
||||
$this->clientError(_('Not logged in.'));
|
||||
return;
|
||||
}
|
||||
|
@ -76,11 +76,13 @@ class FavorAction extends Action
|
|||
return;
|
||||
}
|
||||
if ($user->hasFave($notice)) {
|
||||
// TRANS: Client error displayed when trying to mark a notice as favorite that already is a favorite.
|
||||
$this->clientError(_('This notice is already a favorite!'));
|
||||
return;
|
||||
}
|
||||
$fave = Fave::addNew($user->getProfile(), $notice);
|
||||
if (!$fave) {
|
||||
// TRANS: Server error displayed when trying to mark a notice as favorite fails in the database.
|
||||
$this->serverError(_('Could not create favorite.'));
|
||||
return;
|
||||
}
|
||||
|
@ -89,6 +91,7 @@ class FavorAction extends Action
|
|||
if ($this->boolean('ajax')) {
|
||||
$this->startHTML('text/xml;charset=utf-8');
|
||||
$this->elementStart('head');
|
||||
// TRANS: Page title for page on which favorite notices can be unfavourited.
|
||||
$this->element('title', null, _('Disfavor favorite'));
|
||||
$this->elementEnd('head');
|
||||
$this->elementStart('body');
|
||||
|
@ -123,4 +126,3 @@ class FavorAction extends Action
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@ require_once INSTALLDIR.'/lib/noticelist.php';
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class FavoritedAction extends Action
|
||||
{
|
||||
var $page = null;
|
||||
|
@ -62,8 +61,11 @@ class FavoritedAction extends Action
|
|||
function title()
|
||||
{
|
||||
if ($this->page == 1) {
|
||||
// TRANS: Page title for first page of favorited notices.
|
||||
return _('Popular notices');
|
||||
} else {
|
||||
// TRANS: Page title for all but first page of favorited notices.
|
||||
// TRANS: %d is the page number being displayed.
|
||||
return sprintf(_('Popular notices, page %d'), $this->page);
|
||||
}
|
||||
}
|
||||
|
@ -73,9 +75,9 @@ class FavoritedAction extends Action
|
|||
*
|
||||
* @return instructions for use
|
||||
*/
|
||||
|
||||
function getInstructions()
|
||||
{
|
||||
// TRANS: Description on page displaying favorited notices.
|
||||
return _('The most popular notices on the site right now.');
|
||||
}
|
||||
|
||||
|
@ -84,7 +86,6 @@ class FavoritedAction extends Action
|
|||
*
|
||||
* @return boolean true
|
||||
*/
|
||||
|
||||
function isReadOnly($args)
|
||||
{
|
||||
return true;
|
||||
|
@ -99,7 +100,6 @@ class FavoritedAction extends Action
|
|||
*
|
||||
* @todo move queries from showContent() to here
|
||||
*/
|
||||
|
||||
function prepare($args)
|
||||
{
|
||||
parent::prepare($args);
|
||||
|
@ -119,7 +119,6 @@ class FavoritedAction extends Action
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handle($args)
|
||||
{
|
||||
parent::handle($args);
|
||||
|
@ -134,7 +133,6 @@ class FavoritedAction extends Action
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showPageNotice()
|
||||
{
|
||||
$instr = $this->getInstructions();
|
||||
|
@ -147,12 +145,16 @@ class FavoritedAction extends Action
|
|||
|
||||
function showEmptyList()
|
||||
{
|
||||
// TRANS: Text displayed instead of a list when a site does not yet have any favourited notices.
|
||||
$message = _('Favorite notices appear on this page but no one has favorited one yet.') . ' ';
|
||||
|
||||
if (common_logged_in()) {
|
||||
// TRANS: Additional text displayed instead of a list when a site does not yet have any favourited notices for logged in users.
|
||||
$message .= _('Be the first to add a notice to your favorites by clicking the fave button next to any notice you like.');
|
||||
}
|
||||
else {
|
||||
// TRANS: Additional text displayed instead of a list when a site does not yet have any favourited notices for not logged in users.
|
||||
// TRANS: %%action.register%% is a registration link. "[link text](link)" is Mark Down. Do not change the formatting.
|
||||
$message .= _('Why not [register an account](%%action.register%%) and be the first to add a notice to your favorites!');
|
||||
}
|
||||
|
||||
|
@ -168,7 +170,6 @@ class FavoritedAction extends Action
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showLocalNav()
|
||||
{
|
||||
$nav = new PublicGroupNav($this);
|
||||
|
@ -182,7 +183,6 @@ class FavoritedAction extends Action
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showContent()
|
||||
{
|
||||
$pop = new Popularity();
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* RSS feed for user favorites action class.
|
||||
*
|
||||
|
@ -50,7 +49,6 @@ require_once INSTALLDIR.'/lib/rssaction.php';
|
|||
*/
|
||||
class FavoritesrssAction extends Rss10Action
|
||||
{
|
||||
|
||||
/** The user whose favorites to display */
|
||||
|
||||
var $user = null;
|
||||
|
@ -62,7 +60,6 @@ class FavoritesrssAction extends Rss10Action
|
|||
*
|
||||
* @return boolean success
|
||||
*/
|
||||
|
||||
function prepare($args)
|
||||
{
|
||||
parent::prepare($args);
|
||||
|
@ -71,6 +68,7 @@ class FavoritesrssAction extends Rss10Action
|
|||
$this->user = User::staticGet('nickname', $nickname);
|
||||
|
||||
if (!$this->user) {
|
||||
// TRANS: Client error displayed when trying to get the RSS feed with favorites of a user that does not exist.
|
||||
$this->clientError(_('No such user.'));
|
||||
return false;
|
||||
} else {
|
||||
|
@ -108,10 +106,14 @@ class FavoritesrssAction extends Rss10Action
|
|||
$c = array('url' => common_local_url('favoritesrss',
|
||||
array('nickname' =>
|
||||
$user->nickname)),
|
||||
// TRANS: Title of RSS feed with favourite notices of a user.
|
||||
// TRANS: %s is a user's nickname.
|
||||
'title' => sprintf(_("%s's favorite notices"), $user->nickname),
|
||||
'link' => common_local_url('showfavorites',
|
||||
array('nickname' =>
|
||||
$user->nickname)),
|
||||
// TRANS: Desciption of RSS feed with favourite notices of a user.
|
||||
// TRANS: %1$s is a user's nickname, %2$s is the name of the StatusNet site.
|
||||
'description' => sprintf(_('Updates favored by %1$s on %2$s!'),
|
||||
$user->nickname, common_config('site', 'name')));
|
||||
return $c;
|
||||
|
|
|
@ -45,7 +45,6 @@ require_once INSTALLDIR.'/lib/publicgroupnav.php';
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class FeaturedAction extends Action
|
||||
{
|
||||
var $page = null;
|
||||
|
@ -66,8 +65,11 @@ class FeaturedAction extends Action
|
|||
function title()
|
||||
{
|
||||
if ($this->page == 1) {
|
||||
// TRANS: Page title for first page of featured users.
|
||||
return _('Featured users');
|
||||
} else {
|
||||
// TRANS: Page title for all but first page of featured users.
|
||||
// TRANS: %d is the page number being displayed.
|
||||
return sprintf(_('Featured users, page %d'), $this->page);
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +98,8 @@ class FeaturedAction extends Action
|
|||
|
||||
function getInstructions()
|
||||
{
|
||||
return sprintf(_('A selection of some great users on %s'),
|
||||
// TRANS: Description on page displaying featured users.
|
||||
return sprintf(_('A selection of some great users on %s.'),
|
||||
common_config('site', 'name'));
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
|||
|
||||
require_once(INSTALLDIR.'/actions/shownotice.php');
|
||||
|
||||
// @todo FIXME: Add documentation.
|
||||
class FileAction extends Action
|
||||
{
|
||||
var $id = null;
|
||||
|
@ -31,14 +32,17 @@ class FileAction extends Action
|
|||
parent::prepare($args);
|
||||
$this->id = $this->trimmed('notice');
|
||||
if (empty($this->id)) {
|
||||
// TRANS: Client error displayed when no notice ID was given trying do display a file.
|
||||
$this->clientError(_('No notice ID.'));
|
||||
}
|
||||
$notice = Notice::staticGet('id', $this->id);
|
||||
if (empty($notice)) {
|
||||
// TRANS: Client error displayed when an invalid notice ID was given trying do display a file.
|
||||
$this->clientError(_('No notice.'));
|
||||
}
|
||||
$atts = $notice->attachments();
|
||||
if (empty($atts)) {
|
||||
// TRANS: Client error displayed when trying do display a file for a notice without a file attachement.
|
||||
$this->clientError(_('No attachments.'));
|
||||
}
|
||||
foreach ($atts as $att) {
|
||||
|
@ -48,6 +52,9 @@ class FileAction extends Action
|
|||
}
|
||||
}
|
||||
if (empty($this->filerec)) {
|
||||
// XXX: Is this translation hint correct? If yes, please remove comment, if no, please correct and remove comment.
|
||||
// TRANS: Client error displayed when trying do display a file for a notice with file attachements
|
||||
// TRANS: that could not be found.
|
||||
$this->clientError(_('No uploaded attachments.'));
|
||||
}
|
||||
return true;
|
||||
|
@ -62,11 +69,8 @@ class FileAction extends Action
|
|||
*
|
||||
* @return boolean true
|
||||
*/
|
||||
|
||||
function isReadOnly($args)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@ require_once INSTALLDIR.'/lib/omb.php';
|
|||
*/
|
||||
class FinishremotesubscribeAction extends Action
|
||||
{
|
||||
|
||||
/**
|
||||
* Class handler.
|
||||
*
|
||||
|
@ -56,7 +55,7 @@ class FinishremotesubscribeAction extends Action
|
|||
*
|
||||
* @return nothing
|
||||
*
|
||||
**/
|
||||
*/
|
||||
function handle($args)
|
||||
{
|
||||
parent::handle($args);
|
||||
|
@ -66,6 +65,7 @@ class FinishremotesubscribeAction extends Action
|
|||
$service = unserialize($_SESSION['oauth_authorization_request']);
|
||||
|
||||
if (!$service) {
|
||||
// TRANS: Client error displayed when subscribing to a remote profile and an unexpected response is received.
|
||||
$this->clientError(_('Not expecting this response!'));
|
||||
return;
|
||||
}
|
||||
|
@ -77,6 +77,7 @@ class FinishremotesubscribeAction extends Action
|
|||
$user = User::staticGet('uri', $service->getListeneeURI());
|
||||
|
||||
if (!$user) {
|
||||
// TRANS: Client error displayed when subscribing to a remote profile that does not exist.
|
||||
$this->clientError(_('User being listened to does not exist.'));
|
||||
return;
|
||||
}
|
||||
|
@ -84,6 +85,7 @@ class FinishremotesubscribeAction extends Action
|
|||
$other = User::staticGet('uri', $service->getListenerURI());
|
||||
|
||||
if ($other) {
|
||||
// TRANS: Client error displayed when subscribing to a remote profile that is a local profile.
|
||||
$this->clientError(_('You can use the local subscription!'));
|
||||
return;
|
||||
}
|
||||
|
@ -96,6 +98,7 @@ class FinishremotesubscribeAction extends Action
|
|||
$profile = Profile::staticGet($remote->id);
|
||||
|
||||
if ($user->hasBlocked($profile)) {
|
||||
// TRANS: Client error displayed when subscribing to a remote profile that is blocked form subscribing to.
|
||||
$this->clientError(_('That user has blocked you from subscribing.'));
|
||||
return;
|
||||
}
|
||||
|
@ -107,14 +110,17 @@ class FinishremotesubscribeAction extends Action
|
|||
} catch (OAuthException $e) {
|
||||
if ($e->getMessage() == 'The authorized token does not equal the ' .
|
||||
'submitted token.') {
|
||||
// TRANS: Client error displayed when subscribing to a remote profile without providing an authorised token.
|
||||
$this->clientError(_('You are not authorized.'));
|
||||
return;
|
||||
} else {
|
||||
// TRANS: Client error displayed when subscribing to a remote profile and conversion of the request token to access token fails.
|
||||
$this->clientError(_('Could not convert request token to ' .
|
||||
'access token.'));
|
||||
return;
|
||||
}
|
||||
} catch (OMB_RemoteServiceException $e) {
|
||||
// TRANS: Client error displayed when subscribing to a remote profile fails because of an unsupported version of the OMB protocol.
|
||||
$this->clientError(_('Remote service uses unknown version of ' .
|
||||
'OMB protocol.'));
|
||||
return;
|
||||
|
@ -135,6 +141,7 @@ class FinishremotesubscribeAction extends Action
|
|||
$service->getServiceURI(OMB_ENDPOINT_UPDATEPROFILE);
|
||||
|
||||
if (!$remote->update($orig_remote)) {
|
||||
// TRANS: Server error displayed when subscribing to a remote profile fails because the remote profile could not be updated.
|
||||
$this->serverError(_('Error updating remote profile.'));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ define('LISTENER', 1);
|
|||
define('LISTENEE', -1);
|
||||
define('BOTH', 0);
|
||||
|
||||
// @todo XXX: Documentation missing.
|
||||
class FoafAction extends Action
|
||||
{
|
||||
function isReadOnly($args)
|
||||
|
@ -37,6 +38,7 @@ class FoafAction extends Action
|
|||
$nickname_arg = $this->arg('nickname');
|
||||
|
||||
if (empty($nickname_arg)) {
|
||||
// TRANS: Client error displayed when requesting Friends of a Friend feed without providing a user nickname.
|
||||
$this->clientError(_('No such user.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
@ -55,6 +57,7 @@ class FoafAction extends Action
|
|||
$this->user = User::staticGet('nickname', $this->nickname);
|
||||
|
||||
if (!$this->user) {
|
||||
// TRANS: Client error displayed when requesting Friends of a Friend feed for an object that is not a user.
|
||||
$this->clientError(_('No such user.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
@ -62,6 +65,7 @@ class FoafAction extends Action
|
|||
$this->profile = $this->user->getProfile();
|
||||
|
||||
if (!$this->profile) {
|
||||
// TRANS: Server error displayed when requesting Friends of a Friend feed for a user for which the profile could not be found.
|
||||
$this->serverError(_('User has no profile.'), 500);
|
||||
return false;
|
||||
}
|
||||
|
@ -250,7 +254,6 @@ class FoafAction extends Action
|
|||
* @return array if $fetchSubscribers is set, return a list of info on those
|
||||
* subscriptions.
|
||||
*/
|
||||
|
||||
function showMicrobloggingAccount($profile, $service=null, $useruri=null, $fetchSubscriptions=false, $isSubscriber=false)
|
||||
{
|
||||
$attr = array();
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
|
||||
// @todo XXX: Documentation missing.
|
||||
class FoafGroupAction extends Action
|
||||
{
|
||||
function isReadOnly($args)
|
||||
|
@ -41,6 +42,7 @@ class FoafGroupAction extends Action
|
|||
$nickname_arg = $this->arg('nickname');
|
||||
|
||||
if (empty($nickname_arg)) {
|
||||
// TRANS: Client error displayed when requesting Friends of a Friend feed without providing a group nickname.
|
||||
$this->clientError(_('No such group.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
@ -59,6 +61,7 @@ class FoafGroupAction extends Action
|
|||
$local = Local_group::staticGet('nickname', $this->nickname);
|
||||
|
||||
if (!$local) {
|
||||
// TRANS: Client error displayed when requesting Friends of a Friend feed for a non-local group.
|
||||
$this->clientError(_('No such group.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
@ -66,6 +69,7 @@ class FoafGroupAction extends Action
|
|||
$this->group = User_group::staticGet('id', $local->group_id);
|
||||
|
||||
if (!$this->group) {
|
||||
// TRANS: Client error displayed when requesting Friends of a Friend feed for a nickname that is not a group.
|
||||
$this->clientError(_('No such group.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ class GeocodeAction extends Action
|
|||
*
|
||||
* @return nothing
|
||||
*
|
||||
**/
|
||||
*/
|
||||
function handle($args)
|
||||
{
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
|
@ -89,7 +89,6 @@ class GeocodeAction extends Action
|
|||
*
|
||||
* @return boolean true
|
||||
*/
|
||||
|
||||
function isReadOnly($args)
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -47,13 +47,11 @@ require_once 'MIME/Type.php';
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class GetfileAction extends Action
|
||||
{
|
||||
/**
|
||||
* Path of file to return
|
||||
*/
|
||||
|
||||
var $path = null;
|
||||
|
||||
/**
|
||||
|
@ -63,7 +61,6 @@ class GetfileAction extends Action
|
|||
*
|
||||
* @return success flag
|
||||
*/
|
||||
|
||||
function prepare($args)
|
||||
{
|
||||
parent::prepare($args);
|
||||
|
@ -76,10 +73,12 @@ class GetfileAction extends Action
|
|||
}
|
||||
|
||||
if (empty($path) or !file_exists($path)) {
|
||||
// TRANS: Client error displayed when requesting a non-existent file.
|
||||
$this->clientError(_('No such file.'), 404);
|
||||
return false;
|
||||
}
|
||||
if (!is_readable($path)) {
|
||||
// TRANS: Client error displayed when requesting a file without having read access to it.
|
||||
$this->clientError(_('Cannot read file.'), 403);
|
||||
return false;
|
||||
}
|
||||
|
@ -93,7 +92,6 @@ class GetfileAction extends Action
|
|||
*
|
||||
* @return boolean true
|
||||
*/
|
||||
|
||||
function isReadOnly($args)
|
||||
{
|
||||
return true;
|
||||
|
@ -104,7 +102,6 @@ class GetfileAction extends Action
|
|||
*
|
||||
* @return int last-modified date as unix timestamp
|
||||
*/
|
||||
|
||||
function lastModified()
|
||||
{
|
||||
if (common_config('site', 'use_x_sendfile')) {
|
||||
|
@ -122,7 +119,6 @@ class GetfileAction extends Action
|
|||
*
|
||||
* @return string etag http header
|
||||
*/
|
||||
|
||||
function etag()
|
||||
{
|
||||
if (common_config('site', 'use_x_sendfile')) {
|
||||
|
@ -151,7 +147,6 @@ class GetfileAction extends Action
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handle($args)
|
||||
{
|
||||
// undo headers set by PHP sessions
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* StatusNet, the distributed open-source microblogging tool
|
||||
*
|
||||
* Action class to sandbox an abusive user
|
||||
* Action class to grant user roles.
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
|
@ -32,7 +32,7 @@ if (!defined('STATUSNET')) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sandbox a user.
|
||||
* Assign role to user.
|
||||
*
|
||||
* @category Action
|
||||
* @package StatusNet
|
||||
|
@ -40,7 +40,6 @@ if (!defined('STATUSNET')) {
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class GrantRoleAction extends ProfileFormAction
|
||||
{
|
||||
/**
|
||||
|
@ -50,7 +49,6 @@ class GrantRoleAction extends ProfileFormAction
|
|||
*
|
||||
* @return boolean success flag
|
||||
*/
|
||||
|
||||
function prepare($args)
|
||||
{
|
||||
if (!parent::prepare($args)) {
|
||||
|
@ -59,10 +57,12 @@ class GrantRoleAction extends ProfileFormAction
|
|||
|
||||
$this->role = $this->arg('role');
|
||||
if (!Profile_role::isValid($this->role)) {
|
||||
// TRANS: Client error displayed when trying to assign an invalid role to a user.
|
||||
$this->clientError(_('Invalid role.'));
|
||||
return false;
|
||||
}
|
||||
if (!Profile_role::isSettable($this->role)) {
|
||||
// TRANS: Client error displayed when trying to assign an reserved role to a user.
|
||||
$this->clientError(_('This role is reserved and cannot be set.'));
|
||||
return false;
|
||||
}
|
||||
|
@ -72,6 +72,7 @@ class GrantRoleAction extends ProfileFormAction
|
|||
assert(!empty($cur)); // checked by parent
|
||||
|
||||
if (!$cur->hasRight(Right::GRANTROLE)) {
|
||||
// TRANS: Client error displayed when trying to assign a role to a user while not being allowed to set roles.
|
||||
$this->clientError(_('You cannot grant user roles on this site.'));
|
||||
return false;
|
||||
}
|
||||
|
@ -79,6 +80,7 @@ class GrantRoleAction extends ProfileFormAction
|
|||
assert(!empty($this->profile)); // checked by parent
|
||||
|
||||
if ($this->profile->hasRole($this->role)) {
|
||||
// TRANS: Client error displayed when trying to assign a role to a user that already has that role.
|
||||
$this->clientError(_('User already has this role.'));
|
||||
return false;
|
||||
}
|
||||
|
@ -91,7 +93,6 @@ class GrantRoleAction extends ProfileFormAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handlePost()
|
||||
{
|
||||
$this->profile->grantRole($this->role);
|
||||
|
|
|
@ -40,7 +40,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class GroupblockAction extends RedirectingAction
|
||||
{
|
||||
var $profile = null;
|
||||
|
@ -53,11 +52,11 @@ class GroupblockAction extends RedirectingAction
|
|||
*
|
||||
* @return boolean success flag
|
||||
*/
|
||||
|
||||
function prepare($args)
|
||||
{
|
||||
parent::prepare($args);
|
||||
if (!common_logged_in()) {
|
||||
// TRANS: Client error displayed trying to block a user from a group while not logged in.
|
||||
$this->clientError(_('Not logged in.'));
|
||||
return false;
|
||||
}
|
||||
|
@ -68,35 +67,42 @@ class GroupblockAction extends RedirectingAction
|
|||
}
|
||||
$id = $this->trimmed('blockto');
|
||||
if (empty($id)) {
|
||||
// TRANS: Client error displayed trying to block a user from a group while not specifying a to be blocked user profile.
|
||||
$this->clientError(_('No profile specified.'));
|
||||
return false;
|
||||
}
|
||||
$this->profile = Profile::staticGet('id', $id);
|
||||
if (empty($this->profile)) {
|
||||
// TRANS: Client error displayed trying to block a user from a group while specifying a non-existing profile.
|
||||
$this->clientError(_('No profile with that ID.'));
|
||||
return false;
|
||||
}
|
||||
$group_id = $this->trimmed('blockgroup');
|
||||
if (empty($group_id)) {
|
||||
// TRANS: Client error displayed trying to block a user from a group while not specifying a group to block a profile from.
|
||||
$this->clientError(_('No group specified.'));
|
||||
return false;
|
||||
}
|
||||
$this->group = User_group::staticGet('id', $group_id);
|
||||
if (empty($this->group)) {
|
||||
// TRANS: Client error displayed trying to block a user from a group while specifying a non-existing group.
|
||||
$this->clientError(_('No such group.'));
|
||||
return false;
|
||||
}
|
||||
$user = common_current_user();
|
||||
if (!$user->isAdmin($this->group)) {
|
||||
// TRANS: Client error displayed trying to block a user from a group while not being an admin user.
|
||||
$this->clientError(_('Only an admin can block group members.'), 401);
|
||||
return false;
|
||||
}
|
||||
if (Group_block::isBlocked($this->group, $this->profile)) {
|
||||
// TRANS: Client error displayed trying to block a user from a group while user is already blocked from the given group.
|
||||
$this->clientError(_('User is already blocked from group.'));
|
||||
return false;
|
||||
}
|
||||
// XXX: could have proactive blocks, but we don't have UI for it.
|
||||
if (!$this->profile->isMember($this->group)) {
|
||||
// TRANS: Client error displayed trying to block a user from a group while user is not a member of given group.
|
||||
$this->clientError(_('User is not a member of group.'));
|
||||
return false;
|
||||
}
|
||||
|
@ -131,6 +137,7 @@ class GroupblockAction extends RedirectingAction
|
|||
}
|
||||
|
||||
function title() {
|
||||
// TRANS: Title for block user from group page.
|
||||
return _('Block user from group');
|
||||
}
|
||||
|
||||
|
@ -145,7 +152,6 @@ class GroupblockAction extends RedirectingAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function areYouSureForm()
|
||||
{
|
||||
$id = $this->profile->id;
|
||||
|
@ -155,8 +161,11 @@ class GroupblockAction extends RedirectingAction
|
|||
'action' => common_local_url('groupblock')));
|
||||
$this->elementStart('fieldset');
|
||||
$this->hidden('token', common_session_token());
|
||||
// TRANS: Fieldset legend for block user from group form.
|
||||
$this->element('legend', _('Block user'));
|
||||
$this->element('p', null,
|
||||
// TRANS: Explanatory text for block user from group form before setting the block.
|
||||
// TRANS: %1$s is that to be blocked user, %2$s is the group the user will be blocked from.
|
||||
sprintf(_('Are you sure you want to block user "%1$s" from the group "%2$s"? '.
|
||||
'They will be removed from the group, unable to post, and '.
|
||||
'unable to subscribe to the group in the future.'),
|
||||
|
@ -196,13 +205,13 @@ class GroupblockAction extends RedirectingAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function blockProfile()
|
||||
{
|
||||
$block = Group_block::blockProfile($this->group, $this->profile,
|
||||
common_current_user());
|
||||
|
||||
if (empty($block)) {
|
||||
// TRANS: Server error displayed when trying to block a user from a group fails because of an application error.
|
||||
$this->serverError(_("Database error blocking user from group."));
|
||||
return false;
|
||||
}
|
||||
|
@ -227,6 +236,4 @@ class GroupblockAction extends RedirectingAction
|
|||
parent::showScripts();
|
||||
$this->autofocus('form_action-yes');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ require_once INSTALLDIR.'/lib/feedlist.php';
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class GroupbyidAction extends Action
|
||||
{
|
||||
/** group we're viewing. */
|
||||
|
@ -58,7 +57,6 @@ class GroupbyidAction extends Action
|
|||
*
|
||||
* @return boolean true
|
||||
*/
|
||||
|
||||
function isReadOnly($args)
|
||||
{
|
||||
return true;
|
||||
|
@ -71,6 +69,7 @@ class GroupbyidAction extends Action
|
|||
$id = $this->arg('id');
|
||||
|
||||
if (!$id) {
|
||||
// TRANS: Client error displayed referring to a group's permalink without providing a group ID.
|
||||
$this->clientError(_('No ID.'));
|
||||
return false;
|
||||
}
|
||||
|
@ -80,6 +79,7 @@ class GroupbyidAction extends Action
|
|||
$this->group = User_group::staticGet('id', $id);
|
||||
|
||||
if (!$this->group) {
|
||||
// TRANS: Client error displayed referring to a group's permalink for a non-existing group ID.
|
||||
$this->clientError(_('No such group.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
@ -95,7 +95,6 @@ class GroupbyidAction extends Action
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handle($args)
|
||||
{
|
||||
common_redirect($this->group->homeUrl(), 303);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* StatusNet, the distributed open-source microblogging tool
|
||||
*
|
||||
* Change user password
|
||||
* Saves a design for a given group.
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
|
@ -46,7 +46,6 @@ require_once INSTALLDIR . '/lib/designsettings.php';
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class GroupDesignSettingsAction extends DesignSettingsAction
|
||||
{
|
||||
var $group = null;
|
||||
|
@ -59,12 +58,12 @@ class GroupDesignSettingsAction extends DesignSettingsAction
|
|||
*
|
||||
* @return boolean true
|
||||
*/
|
||||
|
||||
function prepare($args)
|
||||
{
|
||||
parent::prepare($args);
|
||||
|
||||
if (!common_logged_in()) {
|
||||
// TRANS: Client error displayed trying to change group design settings while not logged in.
|
||||
$this->clientError(_('You must be logged in to edit a group.'));
|
||||
return false;
|
||||
}
|
||||
|
@ -81,6 +80,7 @@ class GroupDesignSettingsAction extends DesignSettingsAction
|
|||
}
|
||||
|
||||
if (!$nickname) {
|
||||
// TRANS: Client error displayed trying to change group design settings without providing a group nickname.
|
||||
$this->clientError(_('No nickname.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
@ -97,6 +97,7 @@ class GroupDesignSettingsAction extends DesignSettingsAction
|
|||
}
|
||||
|
||||
if (!$this->group) {
|
||||
// TRANS: Client error displayed trying to change group design settings while providing a nickname for a non-existing group.
|
||||
$this->clientError(_('No such group.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
@ -104,6 +105,7 @@ class GroupDesignSettingsAction extends DesignSettingsAction
|
|||
$cur = common_current_user();
|
||||
|
||||
if (!$cur->isAdmin($this->group)) {
|
||||
// TRANS: Client error displayed trying to change group design settings without being a (group) admin.
|
||||
$this->clientError(_('You must be an admin to edit the group.'), 403);
|
||||
return false;
|
||||
}
|
||||
|
@ -122,7 +124,6 @@ class GroupDesignSettingsAction extends DesignSettingsAction
|
|||
*
|
||||
* @return Design a design object to use
|
||||
*/
|
||||
|
||||
function getDesign()
|
||||
{
|
||||
|
||||
|
@ -141,6 +142,7 @@ class GroupDesignSettingsAction extends DesignSettingsAction
|
|||
|
||||
function title()
|
||||
{
|
||||
// TRANS: Title group design settings page.
|
||||
return _('Group design');
|
||||
}
|
||||
|
||||
|
@ -149,9 +151,9 @@ class GroupDesignSettingsAction extends DesignSettingsAction
|
|||
*
|
||||
* @return instructions for use
|
||||
*/
|
||||
|
||||
function getInstructions()
|
||||
{
|
||||
// TRANS: Instructions for group design settings page.
|
||||
return _('Customize the way your group looks ' .
|
||||
'with a background image and a colour palette of your choice.');
|
||||
}
|
||||
|
@ -161,7 +163,6 @@ class GroupDesignSettingsAction extends DesignSettingsAction
|
|||
*
|
||||
* @return nothing
|
||||
*/
|
||||
|
||||
function showLocalNav()
|
||||
{
|
||||
$nav = new GroupNav($this, $this->group);
|
||||
|
@ -173,7 +174,6 @@ class GroupDesignSettingsAction extends DesignSettingsAction
|
|||
*
|
||||
* @return Design
|
||||
*/
|
||||
|
||||
function getWorkingDesign()
|
||||
{
|
||||
$design = null;
|
||||
|
@ -192,7 +192,6 @@ class GroupDesignSettingsAction extends DesignSettingsAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showContent()
|
||||
{
|
||||
$design = $this->getWorkingDesign();
|
||||
|
@ -209,17 +208,14 @@ class GroupDesignSettingsAction extends DesignSettingsAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function saveDesign()
|
||||
{
|
||||
try {
|
||||
|
||||
$bgcolor = new WebColor($this->trimmed('design_background'));
|
||||
$ccolor = new WebColor($this->trimmed('design_content'));
|
||||
$sbcolor = new WebColor($this->trimmed('design_sidebar'));
|
||||
$tcolor = new WebColor($this->trimmed('design_text'));
|
||||
$lcolor = new WebColor($this->trimmed('design_links'));
|
||||
|
||||
} catch (WebColorException $e) {
|
||||
$this->showForm($e->getMessage());
|
||||
return;
|
||||
|
@ -246,7 +242,6 @@ class GroupDesignSettingsAction extends DesignSettingsAction
|
|||
$design = $this->group->getDesign();
|
||||
|
||||
if (!empty($design)) {
|
||||
|
||||
// update design
|
||||
|
||||
$original = clone($design);
|
||||
|
@ -263,12 +258,11 @@ class GroupDesignSettingsAction extends DesignSettingsAction
|
|||
|
||||
if ($result === false) {
|
||||
common_log_db_error($design, 'UPDATE', __FILE__);
|
||||
$this->showForm(_('Could not update your design.'));
|
||||
// TRANS: Form validation error displayed when group design settings could not be updated because of an application issue.
|
||||
$this->showForm(_('Unable to update your design settings.'));
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
$this->group->query('BEGIN');
|
||||
|
||||
// save new design
|
||||
|
@ -287,6 +281,7 @@ class GroupDesignSettingsAction extends DesignSettingsAction
|
|||
|
||||
if (empty($id)) {
|
||||
common_log_db_error($id, 'INSERT', __FILE__);
|
||||
// TRANS: Form validation error displayed when group design settings could not be saved because of an application issue.
|
||||
$this->showForm(_('Unable to save your design settings.'));
|
||||
return;
|
||||
}
|
||||
|
@ -297,18 +292,18 @@ class GroupDesignSettingsAction extends DesignSettingsAction
|
|||
|
||||
if (empty($result)) {
|
||||
common_log_db_error($original, 'UPDATE', __FILE__);
|
||||
// TRANS: Form validation error displayed when group design settings could not be saved because of an application issue.
|
||||
$this->showForm(_('Unable to save your design settings.'));
|
||||
$this->group->query('ROLLBACK');
|
||||
return;
|
||||
}
|
||||
|
||||
$this->group->query('COMMIT');
|
||||
|
||||
}
|
||||
|
||||
$this->saveBackgroundImage($design);
|
||||
|
||||
// TRANS: Form text to confirm saved group design settings.
|
||||
$this->showForm(_('Design preferences saved.'), true);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -60,7 +60,6 @@ class GrouplogoAction extends GroupDesignAction
|
|||
/**
|
||||
* Prepare to run
|
||||
*/
|
||||
|
||||
function prepare($args)
|
||||
{
|
||||
parent::prepare($args);
|
||||
|
@ -83,7 +82,7 @@ class GrouplogoAction extends GroupDesignAction
|
|||
}
|
||||
|
||||
if (!$nickname) {
|
||||
// TRANS: Client error displayed when trying to change group logo settings without having a nickname.
|
||||
// TRANS: Client error displayed when trying to change group logo settings without providing a nickname.
|
||||
$this->clientError(_('No nickname.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
@ -247,7 +246,6 @@ class GrouplogoAction extends GroupDesignAction
|
|||
|
||||
$this->elementEnd('fieldset');
|
||||
$this->elementEnd('form');
|
||||
|
||||
}
|
||||
|
||||
function showCropForm()
|
||||
|
@ -304,7 +302,6 @@ class GrouplogoAction extends GroupDesignAction
|
|||
$this->elementEnd('ul');
|
||||
$this->elementEnd('fieldset');
|
||||
$this->elementEnd('form');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -438,7 +435,6 @@ class GrouplogoAction extends GroupDesignAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showStylesheets()
|
||||
{
|
||||
parent::showStylesheets();
|
||||
|
@ -450,7 +446,6 @@ class GrouplogoAction extends GroupDesignAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showScripts()
|
||||
{
|
||||
parent::showScripts();
|
||||
|
|
|
@ -43,7 +43,6 @@ require_once INSTALLDIR.'/lib/publicgroupnav.php';
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class GroupmembersAction extends GroupDesignAction
|
||||
{
|
||||
var $page = null;
|
||||
|
@ -73,6 +72,7 @@ class GroupmembersAction extends GroupDesignAction
|
|||
}
|
||||
|
||||
if (!$nickname) {
|
||||
// TRANS: Client error displayed when trying to view group members without providing a group nickname.
|
||||
$this->clientError(_('No nickname.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
@ -80,6 +80,7 @@ class GroupmembersAction extends GroupDesignAction
|
|||
$local = Local_group::staticGet('nickname', $nickname);
|
||||
|
||||
if (!$local) {
|
||||
// TRANS: Client error displayed when trying to view group members for a non-existing group.
|
||||
$this->clientError(_('No such group.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
@ -87,6 +88,7 @@ class GroupmembersAction extends GroupDesignAction
|
|||
$this->group = User_group::staticGet('id', $local->group_id);
|
||||
|
||||
if (!$this->group) {
|
||||
// TRANS: Client error displayed when trying to view group members for an object that is not a group.
|
||||
$this->clientError(_('No such group.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
@ -119,6 +121,7 @@ class GroupmembersAction extends GroupDesignAction
|
|||
function showPageNotice()
|
||||
{
|
||||
$this->element('p', 'instructions',
|
||||
// TRANS: Page notice for group members page.
|
||||
_('A list of the users in this group.'));
|
||||
}
|
||||
|
||||
|
@ -182,7 +185,8 @@ class GroupMemberListItem extends ProfileListItem
|
|||
{
|
||||
parent::showFullName();
|
||||
if ($this->profile->isAdmin($this->group)) {
|
||||
$this->out->text(' ');
|
||||
$this->out->text(' '); // for separating the classes.
|
||||
// TRANS: Indicator in group members list that this user is a group administrator.
|
||||
$this->out->element('span', 'role', _('Admin'));
|
||||
}
|
||||
}
|
||||
|
@ -281,7 +285,6 @@ class GroupMemberListItem extends ProfileListItem
|
|||
*
|
||||
* @see BlockForm
|
||||
*/
|
||||
|
||||
class GroupBlockForm extends Form
|
||||
{
|
||||
/**
|
||||
|
@ -310,7 +313,6 @@ class GroupBlockForm extends Form
|
|||
* @param User_group $group group to block user from
|
||||
* @param array $args return-to args
|
||||
*/
|
||||
|
||||
function __construct($out=null, $profile=null, $group=null, $args=null)
|
||||
{
|
||||
parent::__construct($out);
|
||||
|
@ -325,7 +327,6 @@ class GroupBlockForm extends Form
|
|||
*
|
||||
* @return int ID of the form
|
||||
*/
|
||||
|
||||
function id()
|
||||
{
|
||||
// This should be unique for the page.
|
||||
|
@ -337,7 +338,6 @@ class GroupBlockForm extends Form
|
|||
*
|
||||
* @return string class of the form
|
||||
*/
|
||||
|
||||
function formClass()
|
||||
{
|
||||
return 'form_group_block';
|
||||
|
@ -348,7 +348,6 @@ class GroupBlockForm extends Form
|
|||
*
|
||||
* @return string URL of the action
|
||||
*/
|
||||
|
||||
function action()
|
||||
{
|
||||
return common_local_url('groupblock');
|
||||
|
@ -361,6 +360,7 @@ class GroupBlockForm extends Form
|
|||
*/
|
||||
function formLegend()
|
||||
{
|
||||
// TRANS: Form legend for form to block user from a group.
|
||||
$this->out->element('legend', null, _('Block user from group'));
|
||||
}
|
||||
|
||||
|
@ -369,7 +369,6 @@ class GroupBlockForm extends Form
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function formData()
|
||||
{
|
||||
$this->out->hidden('blockto-' . $this->profile->id,
|
||||
|
@ -390,7 +389,6 @@ class GroupBlockForm extends Form
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function formActions()
|
||||
{
|
||||
$this->out->submit(
|
||||
|
@ -414,25 +412,21 @@ class GroupBlockForm extends Form
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class MakeAdminForm extends Form
|
||||
{
|
||||
/**
|
||||
* Profile of user to block
|
||||
*/
|
||||
|
||||
var $profile = null;
|
||||
|
||||
/**
|
||||
* Group to block the user from
|
||||
*/
|
||||
|
||||
var $group = null;
|
||||
|
||||
/**
|
||||
* Return-to args
|
||||
*/
|
||||
|
||||
var $args = null;
|
||||
|
||||
/**
|
||||
|
@ -443,7 +437,6 @@ class MakeAdminForm extends Form
|
|||
* @param User_group $group group to block user from
|
||||
* @param array $args return-to args
|
||||
*/
|
||||
|
||||
function __construct($out=null, $profile=null, $group=null, $args=null)
|
||||
{
|
||||
parent::__construct($out);
|
||||
|
@ -458,7 +451,6 @@ class MakeAdminForm extends Form
|
|||
*
|
||||
* @return int ID of the form
|
||||
*/
|
||||
|
||||
function id()
|
||||
{
|
||||
// This should be unique for the page.
|
||||
|
@ -470,7 +462,6 @@ class MakeAdminForm extends Form
|
|||
*
|
||||
* @return string class of the form
|
||||
*/
|
||||
|
||||
function formClass()
|
||||
{
|
||||
return 'form_make_admin';
|
||||
|
@ -481,7 +472,6 @@ class MakeAdminForm extends Form
|
|||
*
|
||||
* @return string URL of the action
|
||||
*/
|
||||
|
||||
function action()
|
||||
{
|
||||
return common_local_url('makeadmin', array('nickname' => $this->group->nickname));
|
||||
|
@ -492,9 +482,9 @@ class MakeAdminForm extends Form
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function formLegend()
|
||||
{
|
||||
// TRANS: Form legend for form to make a user a group admin.
|
||||
$this->out->element('legend', null, _('Make user an admin of the group'));
|
||||
}
|
||||
|
||||
|
@ -503,7 +493,6 @@ class MakeAdminForm extends Form
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function formData()
|
||||
{
|
||||
$this->out->hidden('profileid-' . $this->profile->id,
|
||||
|
@ -524,7 +513,6 @@ class MakeAdminForm extends Form
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function formActions()
|
||||
{
|
||||
$this->out->submit(
|
||||
|
|
|
@ -45,7 +45,6 @@ define('MEMBERS_PER_SECTION', 27);
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class groupRssAction extends Rss10Action
|
||||
{
|
||||
/** group we're viewing. */
|
||||
|
@ -56,7 +55,6 @@ class groupRssAction extends Rss10Action
|
|||
*
|
||||
* @return boolean true
|
||||
*/
|
||||
|
||||
function isReadOnly($args)
|
||||
{
|
||||
return true;
|
||||
|
@ -71,7 +69,6 @@ class groupRssAction extends Rss10Action
|
|||
*
|
||||
* @return boolean success flag
|
||||
*/
|
||||
|
||||
function prepare($args)
|
||||
{
|
||||
parent::prepare($args);
|
||||
|
@ -88,6 +85,7 @@ class groupRssAction extends Rss10Action
|
|||
}
|
||||
|
||||
if (!$nickname) {
|
||||
// TRANS: Client error displayed when requesting a group RSS feed without providing a group nickname.
|
||||
$this->clientError(_('No nickname.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
@ -95,6 +93,7 @@ class groupRssAction extends Rss10Action
|
|||
$local = Local_group::staticGet('nickname', $nickname);
|
||||
|
||||
if (!$local) {
|
||||
// TRANS: Client error displayed when requesting a group RSS feed for group that does not exist.
|
||||
$this->clientError(_('No such group.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
@ -102,6 +101,7 @@ class groupRssAction extends Rss10Action
|
|||
$this->group = User_group::staticGet('id', $local->group_id);
|
||||
|
||||
if (!$this->group) {
|
||||
// TRANS: Client error displayed when requesting a group RSS feed for an object that is not a group.
|
||||
$this->clientError(_('No such group.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
@ -112,7 +112,6 @@ class groupRssAction extends Rss10Action
|
|||
|
||||
function getNotices($limit=0)
|
||||
{
|
||||
|
||||
$group = $this->group;
|
||||
|
||||
if (is_null($group)) {
|
||||
|
|
|
@ -45,7 +45,6 @@ require_once INSTALLDIR.'/lib/grouplist.php';
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class GroupsAction extends Action
|
||||
{
|
||||
var $page = null;
|
||||
|
@ -59,9 +58,12 @@ class GroupsAction extends Action
|
|||
function title()
|
||||
{
|
||||
if ($this->page == 1) {
|
||||
return _("Groups");
|
||||
// TRANS: Title for first page of the groups list.
|
||||
return _m('TITLE',"Groups");
|
||||
} else {
|
||||
return sprintf(_("Groups, page %d"), $this->page);
|
||||
// TRANS: Title for all but the first page of the groups list.
|
||||
// TRANS: %d is the page number.
|
||||
return sprintf(_m('TITLE',"Groups, page %d"), $this->page);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,12 +89,15 @@ class GroupsAction extends Action
|
|||
function showPageNotice()
|
||||
{
|
||||
$notice =
|
||||
// TRANS: Page notice of group list. %%%%site.name%%%% is the StatusNet site name,
|
||||
// TRANS: %%%%action.groupsearch%%%% and %%%%action.newgroup%%%% are URLs. Do not change them.
|
||||
// TRANS: This message contains Markdown links in the form [link text](link).
|
||||
sprintf(_('%%%%site.name%%%% groups let you find and talk with ' .
|
||||
'people of similar interests. After you join a group ' .
|
||||
'you can send messages to all other members using the ' .
|
||||
'syntax "!groupname". Don\'t see a group you like? Try ' .
|
||||
'[searching for one](%%%%action.groupsearch%%%%) or ' .
|
||||
'[start your own!](%%%%action.newgroup%%%%)'));
|
||||
'[start your own](%%%%action.newgroup%%%%)!'));
|
||||
$this->elementStart('div', 'instructions');
|
||||
$this->raw(common_markup_to_html($notice));
|
||||
$this->elementEnd('div');
|
||||
|
@ -104,6 +109,7 @@ class GroupsAction extends Action
|
|||
$this->elementStart('p', array('id' => 'new_group'));
|
||||
$this->element('a', array('href' => common_local_url('newgroup'),
|
||||
'class' => 'more'),
|
||||
// TRANS: Link to create a new group on the group list page.
|
||||
_('Create a new group'));
|
||||
$this->elementEnd('p');
|
||||
}
|
||||
|
|
|
@ -49,12 +49,14 @@ class GroupsearchAction extends SearchAction
|
|||
{
|
||||
function getInstructions()
|
||||
{
|
||||
// TRANS: Instructions for page where groups can be searched. %%site.name%% is the name of the StatusNet site.
|
||||
return _('Search for groups on %%site.name%% by their name, location, or description. ' .
|
||||
'Separate the terms by spaces; they must be 3 characters or more.');
|
||||
}
|
||||
|
||||
function title()
|
||||
{
|
||||
// TRANS: Title for page where groups can be searched.
|
||||
return _('Group search');
|
||||
}
|
||||
|
||||
|
@ -76,12 +78,17 @@ class GroupsearchAction extends SearchAction
|
|||
$this->pagination($page > 1, $cnt > GROUPS_PER_PAGE,
|
||||
$page, 'groupsearch', array('q' => $q));
|
||||
} else {
|
||||
// TRANS: Text on page where groups can be searched if no results were found for a query.
|
||||
$this->element('p', 'error', _('No results.'));
|
||||
$this->searchSuggestions($q);
|
||||
if (common_logged_in()) {
|
||||
$message = _('If you can\'t find the group you\'re looking for, you can [create it](%%action.newgroup%%) yourself.');
|
||||
// TRANS: Additional text on page where groups can be searched if no results were found for a query for a logged in user.
|
||||
// TRANS: This message contains Markdown links in the form [link text](link).
|
||||
$message = _('If you cannot find the group you\'re looking for, you can [create it](%%action.newgroup%%) yourself.');
|
||||
}
|
||||
else {
|
||||
// TRANS: Additional text on page where groups can be searched if no results were found for a query for a not logged in user.
|
||||
// TRANS: This message contains Markdown links in the form [link text](link).
|
||||
$message = _('Why not [register an account](%%action.register%%) and [create the group](%%action.newgroup%%) yourself!');
|
||||
}
|
||||
$this->elementStart('div', 'guide');
|
||||
|
@ -116,4 +123,3 @@ class GroupSearchResults extends GroupList
|
|||
return preg_replace($this->pattern, '<strong>\\1</strong>', htmlspecialchars($text));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -79,6 +79,7 @@ class GroupunblockAction extends Action
|
|||
}
|
||||
$group_id = $this->trimmed('unblockgroup');
|
||||
if (empty($group_id)) {
|
||||
// TRANS: Client error displayed when trying to unblock a user from a group without providing a group.
|
||||
$this->clientError(_('No group specified.'));
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,6 @@ if (!defined('STATUSNET')) {
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class HcardAction extends Action
|
||||
{
|
||||
var $user;
|
||||
|
@ -64,6 +63,7 @@ class HcardAction extends Action
|
|||
$this->user = User::staticGet('nickname', $nickname);
|
||||
|
||||
if (!$this->user) {
|
||||
// TRANS: Client error displayed when trying to get a user hCard for a non-existing user.
|
||||
$this->clientError(_('No such user.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ class HcardAction extends Action
|
|||
$this->profile = $this->user->getProfile();
|
||||
|
||||
if (!$this->profile) {
|
||||
// TRANS: Server error displayed when trying to get a user hCard for a user without a profile.
|
||||
$this->serverError(_('User has no profile.'));
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -28,9 +28,9 @@ if (!defined('STATUSNET')) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
// @todo XXX: Add documentation.
|
||||
class HostMetaAction extends Action
|
||||
{
|
||||
|
||||
/**
|
||||
* Is read only?
|
||||
*
|
||||
|
|
|
@ -54,7 +54,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||
*/
|
||||
function title()
|
||||
{
|
||||
// TRANS: Title for instance messaging settings.
|
||||
// TRANS: Title for Instant Messaging settings.
|
||||
return _('IM settings');
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||
// TRANS: [instant messages] is link text, "(%%doc.im%%)" is the link.
|
||||
// TRANS: the order and formatting of link text and link should remain unchanged.
|
||||
return _('You can send and receive notices through '.
|
||||
'Jabber/GTalk [instant messages](%%doc.im%%). '.
|
||||
'Jabber/Google Talk [instant messages](%%doc.im%%). '.
|
||||
'Configure your address and settings below.');
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||
{
|
||||
if (!common_config('xmpp', 'enabled')) {
|
||||
$this->element('div', array('class' => 'error'),
|
||||
// TRANS: Message given in the IM settings if XMPP is not enabled on the site.
|
||||
// TRANS: Message given in the Instant Messaging settings if XMPP is not enabled on the site.
|
||||
_('IM is not available.'));
|
||||
return;
|
||||
}
|
||||
|
@ -98,88 +98,88 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||
'action' =>
|
||||
common_local_url('imsettings')));
|
||||
$this->elementStart('fieldset', array('id' => 'settings_im_address'));
|
||||
// TRANS: Form legend for IM settings form.
|
||||
// TRANS: Form legend for Instant Messaging settings form.
|
||||
$this->element('legend', null, _('IM address'));
|
||||
$this->hidden('token', common_session_token());
|
||||
|
||||
if ($user->jabber) {
|
||||
$this->element('p', 'form_confirmed', $user->jabber);
|
||||
// TRANS: Form note in IM settings form.
|
||||
// TRANS: Form note in Instant Messaging settings form.
|
||||
$this->element('p', 'form_note',
|
||||
_('Current confirmed Jabber/GTalk address.'));
|
||||
_('Current confirmed Jabber/Google Talk address.'));
|
||||
$this->hidden('jabber', $user->jabber);
|
||||
// TRANS: Button label to remove a confirmed IM address.
|
||||
// TRANS: Button label to remove a confirmed Instant Messaging address.
|
||||
$this->submit('remove', _m('BUTTON','Remove'));
|
||||
} else {
|
||||
$confirm = $this->getConfirmation();
|
||||
if ($confirm) {
|
||||
$this->element('p', 'form_unconfirmed', $confirm->address);
|
||||
$this->element('p', 'form_note',
|
||||
// TRANS: Form note in IM settings form.
|
||||
// TRANS: %s is the IM address set for the site.
|
||||
// TRANS: Form note in Instant Messaging settings form.
|
||||
// TRANS: %s is the Instant Messaging address set for the site.
|
||||
sprintf(_('Awaiting confirmation on this address. '.
|
||||
'Check your Jabber/GTalk account for a '.
|
||||
'Check your Jabber/Google Talk account for a '.
|
||||
'message with further instructions. '.
|
||||
'(Did you add %s to your buddy list?)'),
|
||||
jabber_daemon_address()));
|
||||
$this->hidden('jabber', $confirm->address);
|
||||
// TRANS: Button label to cancel an IM address confirmation procedure.
|
||||
// TRANS: Button label to cancel an Instant Messaging address confirmation procedure.
|
||||
$this->submit('cancel', _m('BUTTON','Cancel'));
|
||||
} else {
|
||||
$this->elementStart('ul', 'form_data');
|
||||
$this->elementStart('li');
|
||||
// TRANS: Field label for IM address input in IM settings form.
|
||||
// TRANS: Field label for Instant Messaging address input in Instant Messaging settings form.
|
||||
$this->input('jabber', _('IM address'),
|
||||
($this->arg('jabber')) ? $this->arg('jabber') : null,
|
||||
// TRANS: IM address input field instructions in IM settings form.
|
||||
// TRANS: %s is the IM address set for the site.
|
||||
// TRANS: IM address input field instructions in Instant Messaging settings form.
|
||||
// TRANS: %s is the Instant Messaging address set for the site.
|
||||
// TRANS: Do not translate "example.org". It is one of the domain names reserved for use in examples by
|
||||
// TRANS: http://www.rfc-editor.org/rfc/rfc2606.txt. Any other domain may be owned by a legitimate
|
||||
// TRANS: person or organization.
|
||||
sprintf(_('Jabber or GTalk address, '.
|
||||
sprintf(_('Jabber or Google Talk address, '.
|
||||
'like "UserName@example.org". '.
|
||||
'First, make sure to add %s to your '.
|
||||
'buddy list in your IM client or on GTalk.'),
|
||||
'buddy list in your IM client or on Google Talk.'),
|
||||
jabber_daemon_address()));
|
||||
$this->elementEnd('li');
|
||||
$this->elementEnd('ul');
|
||||
// TRANS: Button label for adding an IM address in IM settings form.
|
||||
// TRANS: Button label for adding an Instant Messaging address in Instant Messaging settings form.
|
||||
$this->submit('add', _m('BUTTON','Add'));
|
||||
}
|
||||
}
|
||||
$this->elementEnd('fieldset');
|
||||
|
||||
$this->elementStart('fieldset', array('id' => 'settings_im_preferences'));
|
||||
// TRANS: Form legend for IM preferences form.
|
||||
// TRANS: Form legend for Instant Messaging preferences form.
|
||||
$this->element('legend', null, _('IM preferences'));
|
||||
$this->elementStart('ul', 'form_data');
|
||||
$this->elementStart('li');
|
||||
$this->checkbox('jabbernotify',
|
||||
// TRANS: Checkbox label in IM preferences form.
|
||||
_('Send me notices through Jabber/GTalk.'),
|
||||
// TRANS: Checkbox label in Instant Messaging preferences form.
|
||||
_('Send me notices through Jabber/Google Talk.'),
|
||||
$user->jabbernotify);
|
||||
$this->elementEnd('li');
|
||||
$this->elementStart('li');
|
||||
$this->checkbox('updatefrompresence',
|
||||
// TRANS: Checkbox label in IM preferences form.
|
||||
_('Post a notice when my Jabber/GTalk status changes.'),
|
||||
// TRANS: Checkbox label in Instant Messaging preferences form.
|
||||
_('Post a notice when my Jabber/Google Talk status changes.'),
|
||||
$user->updatefrompresence);
|
||||
$this->elementEnd('li');
|
||||
$this->elementStart('li');
|
||||
$this->checkbox('jabberreplies',
|
||||
// TRANS: Checkbox label in IM preferences form.
|
||||
_('Send me replies through Jabber/GTalk '.
|
||||
// TRANS: Checkbox label in Instant Messaging preferences form.
|
||||
_('Send me replies through Jabber/Google Talk '.
|
||||
'from people I\'m not subscribed to.'),
|
||||
$user->jabberreplies);
|
||||
$this->elementEnd('li');
|
||||
$this->elementStart('li');
|
||||
$this->checkbox('jabbermicroid',
|
||||
// TRANS: Checkbox label in IM preferences form.
|
||||
_('Publish a MicroID for my Jabber/GTalk address.'),
|
||||
// TRANS: Checkbox label in Instant Messaging preferences form.
|
||||
_('Publish a MicroID for my Jabber/Google Talk address.'),
|
||||
$user->jabbermicroid);
|
||||
$this->elementEnd('li');
|
||||
$this->elementEnd('ul');
|
||||
// TRANS: Button label to save IM preferences.
|
||||
// TRANS: Button label to save Instant Messaging preferences.
|
||||
$this->submit('save', _m('BUTTON','Save'));
|
||||
$this->elementEnd('fieldset');
|
||||
$this->elementEnd('form');
|
||||
|
@ -235,7 +235,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||
} else if ($this->arg('remove')) {
|
||||
$this->removeAddress();
|
||||
} else {
|
||||
// TRANS: Message given submitting a form with an unknown action in IM settings.
|
||||
// TRANS: Message given submitting a form with an unknown action in Instant Messaging settings.
|
||||
$this->showForm(_('Unexpected form submission.'));
|
||||
}
|
||||
}
|
||||
|
@ -272,14 +272,14 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||
|
||||
if ($result === false) {
|
||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||
// TRANS: Server error thrown on database error updating IM preferences.
|
||||
// TRANS: Server error thrown on database error updating Instant Messaging preferences.
|
||||
$this->serverError(_('Could not update user.'));
|
||||
return;
|
||||
}
|
||||
|
||||
$user->query('COMMIT');
|
||||
|
||||
// TRANS: Confirmation message for successful IM preferences save.
|
||||
// TRANS: Confirmation message for successful Instant Messaging preferences save.
|
||||
$this->showForm(_('Preferences saved.'), true);
|
||||
}
|
||||
|
||||
|
@ -300,7 +300,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||
// Some validation
|
||||
|
||||
if (!$jabber) {
|
||||
// TRANS: Message given saving IM address without having provided one.
|
||||
// TRANS: Message given saving Instant Messaging address without having provided one.
|
||||
$this->showForm(_('No Jabber ID.'));
|
||||
return;
|
||||
}
|
||||
|
@ -308,20 +308,20 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||
$jabber = jabber_normalize_jid($jabber);
|
||||
|
||||
if (!$jabber) {
|
||||
// TRANS: Message given saving IM address that cannot be normalised.
|
||||
$this->showForm(_('Cannot normalize that Jabber ID'));
|
||||
// TRANS: Message given saving Instant Messaging address that cannot be normalised.
|
||||
$this->showForm(_('Cannot normalize that Jabber ID.'));
|
||||
return;
|
||||
}
|
||||
if (!jabber_valid_base_jid($jabber, common_config('email', 'domain_check'))) {
|
||||
// TRANS: Message given saving IM address that not valid.
|
||||
$this->showForm(_('Not a valid Jabber ID'));
|
||||
// TRANS: Message given saving Instant Messaging address that not valid.
|
||||
$this->showForm(_('Not a valid Jabber ID.'));
|
||||
return;
|
||||
} else if ($user->jabber == $jabber) {
|
||||
// TRANS: Message given saving IM address that is already set.
|
||||
// TRANS: Message given saving Instant Messaging address that is already set.
|
||||
$this->showForm(_('That is already your Jabber ID.'));
|
||||
return;
|
||||
} else if ($this->jabberExists($jabber)) {
|
||||
// TRANS: Message given saving IM address that is already set for another user.
|
||||
// TRANS: Message given saving Instant Messaging address that is already set for another user.
|
||||
$this->showForm(_('Jabber ID already belongs to another user.'));
|
||||
return;
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||
|
||||
if ($result === false) {
|
||||
common_log_db_error($confirm, 'INSERT', __FILE__);
|
||||
// TRANS: Server error thrown on database error adding IM confirmation code.
|
||||
// TRANS: Server error thrown on database error adding Instant Messaging confirmation code.
|
||||
$this->serverError(_('Could not insert confirmation code.'));
|
||||
return;
|
||||
}
|
||||
|
@ -348,8 +348,8 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||
$user->nickname,
|
||||
$jabber);
|
||||
|
||||
// TRANS: Message given saving valid IM address that is to be confirmed.
|
||||
// TRANS: %s is the IM address set for the site.
|
||||
// TRANS: Message given saving valid Instant Messaging address that is to be confirmed.
|
||||
// TRANS: %s is the Instant Messaging address set for the site.
|
||||
$msg = sprintf(_('A confirmation code was sent '.
|
||||
'to the IM address you added. '.
|
||||
'You must approve %s for '.
|
||||
|
@ -373,12 +373,12 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||
$confirm = $this->getConfirmation();
|
||||
|
||||
if (!$confirm) {
|
||||
// TRANS: Message given canceling IM address confirmation that is not pending.
|
||||
// TRANS: Message given canceling Instant Messaging address confirmation that is not pending.
|
||||
$this->showForm(_('No pending confirmation to cancel.'));
|
||||
return;
|
||||
}
|
||||
if ($confirm->address != $jabber) {
|
||||
// TRANS: Message given canceling IM address confirmation for the wrong IM address.
|
||||
// TRANS: Message given canceling Instant Messaging address confirmation for the wrong IM address.
|
||||
$this->showForm(_('That is the wrong IM address.'));
|
||||
return;
|
||||
}
|
||||
|
@ -387,12 +387,12 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||
|
||||
if (!$result) {
|
||||
common_log_db_error($confirm, 'DELETE', __FILE__);
|
||||
// TRANS: Server error thrown on database error canceling IM address confirmation.
|
||||
// TRANS: Server error thrown on database error canceling Instant Messaging address confirmation.
|
||||
$this->serverError(_('Could not delete IM confirmation.'));
|
||||
return;
|
||||
}
|
||||
|
||||
// TRANS: Message given after successfully canceling IM address confirmation.
|
||||
// TRANS: Message given after successfully canceling Instant Messaging address confirmation.
|
||||
$this->showForm(_('IM confirmation cancelled.'), true);
|
||||
}
|
||||
|
||||
|
@ -412,7 +412,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||
// Maybe an old tab open...?
|
||||
|
||||
if ($user->jabber != $jabber) {
|
||||
// TRANS: Message given trying to remove an IM address that is not
|
||||
// TRANS: Message given trying to remove an Instant Messaging address that is not
|
||||
// TRANS: registered for the active user.
|
||||
$this->showForm(_('That is not your Jabber ID.'));
|
||||
return;
|
||||
|
@ -428,7 +428,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||
|
||||
if (!$result) {
|
||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||
// TRANS: Server error thrown on database error removing a registered IM address.
|
||||
// TRANS: Server error thrown on database error removing a registered Instant Messaging address.
|
||||
$this->serverError(_('Could not update user.'));
|
||||
return;
|
||||
}
|
||||
|
@ -436,7 +436,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||
|
||||
// XXX: unsubscribe to the old address
|
||||
|
||||
// TRANS: Message given after successfully removing a registered IM address.
|
||||
// TRANS: Message given after successfully removing a registered Instant Messaging address.
|
||||
$this->showForm(_('The IM address was removed.'), true);
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@ require_once INSTALLDIR.'/lib/mailbox.php';
|
|||
* @link http://status.net/
|
||||
* @see MailboxAction
|
||||
*/
|
||||
|
||||
class InboxAction extends MailboxAction
|
||||
{
|
||||
|
||||
|
@ -52,13 +51,16 @@ class InboxAction extends MailboxAction
|
|||
*
|
||||
* @return string page title
|
||||
*/
|
||||
|
||||
function title()
|
||||
{
|
||||
if ($this->page > 1) {
|
||||
// TRANS: Title for all but the first page of the inbox page.
|
||||
// TRANS: %1$s is the user's nickname, %2$s is the page number.
|
||||
return sprintf(_('Inbox for %1$s - page %2$d'), $this->user->nickname,
|
||||
$this->page);
|
||||
} else {
|
||||
// TRANS: Title for the first page of the inbox page.
|
||||
// TRANS: %s is the user's nickname.
|
||||
return sprintf(_('Inbox for %s'), $this->user->nickname);
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +74,6 @@ class InboxAction extends MailboxAction
|
|||
*
|
||||
* @see MailboxAction::getMessages()
|
||||
*/
|
||||
|
||||
function getMessages()
|
||||
{
|
||||
$message = new Message();
|
||||
|
@ -98,7 +99,6 @@ class InboxAction extends MailboxAction
|
|||
*
|
||||
* @return Profile The profile that matches the message
|
||||
*/
|
||||
|
||||
function getMessageProfile($message)
|
||||
{
|
||||
return $message->getFrom();
|
||||
|
@ -109,9 +109,9 @@ class InboxAction extends MailboxAction
|
|||
*
|
||||
* @return string localised instructions for using the page
|
||||
*/
|
||||
|
||||
function getInstructions()
|
||||
{
|
||||
// TRANS: Instructions for user inbox page.
|
||||
return _('This is your inbox, which lists your incoming private messages.');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
|
||||
// @todo XXX: Add documentation.
|
||||
class InviteAction extends CurrentUserDesignAction
|
||||
{
|
||||
var $mode = null;
|
||||
|
@ -217,7 +218,7 @@ class InviteAction extends CurrentUserDesignAction
|
|||
$this->textarea('addresses', _('Email addresses'),
|
||||
$this->trimmed('addresses'),
|
||||
// TRANS: Tooltip for field label for a list of e-mail addresses.
|
||||
_('Addresses of friends to invite (one per line)'));
|
||||
_('Addresses of friends to invite (one per line).'));
|
||||
$this->elementEnd('li');
|
||||
$this->elementStart('li');
|
||||
// TRANS: Field label for a personal message to send to invitees.
|
||||
|
|
|
@ -55,7 +55,6 @@ class NewApplicationAction extends OwnerDesignAction
|
|||
/**
|
||||
* Prepare to run
|
||||
*/
|
||||
|
||||
function prepare($args)
|
||||
{
|
||||
parent::prepare($args);
|
||||
|
@ -78,7 +77,6 @@ class NewApplicationAction extends OwnerDesignAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handle($args)
|
||||
{
|
||||
parent::handle($args);
|
||||
|
@ -122,6 +120,7 @@ class NewApplicationAction extends OwnerDesignAction
|
|||
} elseif ($this->arg('save')) {
|
||||
$this->trySave();
|
||||
} else {
|
||||
// TRANS: Client error displayed when encountering an unexpected action on form submission.
|
||||
$this->clientError(_('Unexpected form submission.'));
|
||||
}
|
||||
}
|
||||
|
@ -144,6 +143,7 @@ class NewApplicationAction extends OwnerDesignAction
|
|||
$this->element('p', 'error', $this->msg);
|
||||
} else {
|
||||
$this->element('p', 'instructions',
|
||||
// TRANS: Form instructions for registering a new application.
|
||||
_('Use this form to register a new application.'));
|
||||
}
|
||||
}
|
||||
|
@ -160,15 +160,19 @@ class NewApplicationAction extends OwnerDesignAction
|
|||
$access_type = $this->arg('default_access_type');
|
||||
|
||||
if (empty($name)) {
|
||||
// TRANS: Validation error shown when not providing a name in the "New application" form.
|
||||
$this->showForm(_('Name is required.'));
|
||||
return;
|
||||
} else if ($this->nameExists($name)) {
|
||||
// TRANS: Validation error shown when providing a name for an application that already exists in the "New application" form.
|
||||
$this->showForm(_('Name already in use. Try another one.'));
|
||||
return;
|
||||
} elseif (mb_strlen($name) > 255) {
|
||||
// TRANS: Validation error shown when providing too long a name in the "New application" form.
|
||||
$this->showForm(_('Name is too long (maximum 255 characters).'));
|
||||
return;
|
||||
} elseif (empty($description)) {
|
||||
// TRANS: Validation error shown when not providing a description in the "New application" form.
|
||||
$this->showForm(_('Description is required.'));
|
||||
return;
|
||||
} elseif (Oauth_application::descriptionTooLong($description)) {
|
||||
|
@ -181,6 +185,7 @@ class NewApplicationAction extends OwnerDesignAction
|
|||
Oauth_application::maxDesc()));
|
||||
return;
|
||||
} elseif (empty($source_url)) {
|
||||
// TRANS: Validation error shown when not providing a source URL in the "New application" form.
|
||||
$this->showForm(_('Source URL is required.'));
|
||||
return;
|
||||
} elseif ((strlen($source_url) > 0)
|
||||
|
@ -190,15 +195,19 @@ class NewApplicationAction extends OwnerDesignAction
|
|||
)
|
||||
)
|
||||
{
|
||||
// TRANS: Validation error shown when providing an invalid source URL in the "New application" form.
|
||||
$this->showForm(_('Source URL is not valid.'));
|
||||
return;
|
||||
} elseif (empty($organization)) {
|
||||
// TRANS: Validation error shown when not providing an organisation in the "New application" form.
|
||||
$this->showForm(_('Organization is required.'));
|
||||
return;
|
||||
} elseif (mb_strlen($organization) > 255) {
|
||||
// TRANS: Validation error shown when providing too long an arganisation name in the "Edit application" form.
|
||||
$this->showForm(_('Organization is too long (maximum 255 characters).'));
|
||||
return;
|
||||
} elseif (empty($homepage)) {
|
||||
// TRANS: Form validation error show when an organisation name has not been provided in the new application form.
|
||||
$this->showForm(_('Organization homepage is required.'));
|
||||
return;
|
||||
} elseif ((strlen($homepage) > 0)
|
||||
|
@ -208,9 +217,11 @@ class NewApplicationAction extends OwnerDesignAction
|
|||
)
|
||||
)
|
||||
{
|
||||
// TRANS: Validation error shown when providing an invalid homepage URL in the "New application" form.
|
||||
$this->showForm(_('Homepage is not a valid URL.'));
|
||||
return;
|
||||
} elseif (mb_strlen($callback_url) > 255) {
|
||||
// TRANS: Validation error shown when providing too long a callback URL in the "New application" form.
|
||||
$this->showForm(_('Callback is too long.'));
|
||||
return;
|
||||
} elseif (strlen($callback_url) > 0
|
||||
|
@ -220,6 +231,7 @@ class NewApplicationAction extends OwnerDesignAction
|
|||
)
|
||||
)
|
||||
{
|
||||
// TRANS: Validation error shown when providing an invalid callback URL in the "New application" form.
|
||||
$this->showForm(_('Callback URL is not valid.'));
|
||||
return;
|
||||
}
|
||||
|
@ -263,6 +275,7 @@ class NewApplicationAction extends OwnerDesignAction
|
|||
|
||||
if (!$result) {
|
||||
common_log_db_error($consumer, 'INSERT', __FILE__);
|
||||
// TRANS: Server error displayed when an application could not be registered in the database through the "New application" form.
|
||||
$this->serverError(_('Could not create application.'));
|
||||
}
|
||||
|
||||
|
@ -272,6 +285,7 @@ class NewApplicationAction extends OwnerDesignAction
|
|||
|
||||
if (!$this->app_id) {
|
||||
common_log_db_error($app, 'INSERT', __FILE__);
|
||||
// TRANS: Server error displayed when an application could not be registered in the database through the "New application" form.
|
||||
$this->serverError(_('Could not create application.'));
|
||||
$app->query('ROLLBACK');
|
||||
}
|
||||
|
@ -281,7 +295,6 @@ class NewApplicationAction extends OwnerDesignAction
|
|||
$app->query('COMMIT');
|
||||
|
||||
common_redirect(common_local_url('oauthappssettings'), 303);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -294,12 +307,9 @@ class NewApplicationAction extends OwnerDesignAction
|
|||
*
|
||||
* @return boolean true if the name already exists
|
||||
*/
|
||||
|
||||
function nameExists($name)
|
||||
{
|
||||
$app = Oauth_application::staticGet('name', $name);
|
||||
return !empty($app);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -183,11 +183,12 @@ class NewgroupAction extends Action
|
|||
foreach ($aliases as $alias) {
|
||||
if (!Nickname::isValid($alias)) {
|
||||
// TRANS: Group create form validation error.
|
||||
// TRANS: %s is the invalid alias.
|
||||
$this->showForm(sprintf(_('Invalid alias: "%s"'), $alias));
|
||||
return;
|
||||
}
|
||||
if ($this->nicknameExists($alias)) {
|
||||
// TRANS: Group create form validation error.
|
||||
// TRANS: Group create form validation error. %s is the already used alias.
|
||||
$this->showForm(sprintf(_('Alias "%s" already in use. Try another one.'),
|
||||
$alias));
|
||||
return;
|
||||
|
@ -195,7 +196,7 @@ class NewgroupAction extends Action
|
|||
// XXX assumes alphanum nicknames
|
||||
if (strcmp($alias, $nickname) == 0) {
|
||||
// TRANS: Group create form validation error.
|
||||
$this->showForm(_('Alias can\'t be the same as nickname.'));
|
||||
$this->showForm(_('Alias cannot be the same as nickname.'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,6 @@ require_once INSTALLDIR.'/lib/feedlist.php';
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class ShowfavoritesAction extends OwnerDesignAction
|
||||
{
|
||||
/** User we're getting the faves of */
|
||||
|
@ -57,7 +56,6 @@ class ShowfavoritesAction extends OwnerDesignAction
|
|||
*
|
||||
* @return boolean true
|
||||
*/
|
||||
|
||||
function isReadOnly($args)
|
||||
{
|
||||
return true;
|
||||
|
@ -70,12 +68,15 @@ class ShowfavoritesAction extends OwnerDesignAction
|
|||
*
|
||||
* @return string title of page
|
||||
*/
|
||||
|
||||
function title()
|
||||
{
|
||||
if ($this->page == 1) {
|
||||
// TRANS: Title for first page of favourite notices of a user.
|
||||
// TRANS: %s is the user for whom the favourite notices are displayed.
|
||||
return sprintf(_('%s\'s favorite notices'), $this->user->nickname);
|
||||
} else {
|
||||
// TRANS: Title for all but the first page of favourite notices of a user.
|
||||
// TRANS: %1$s is the user for whom the favourite notices are displayed, %2$d is the page number.
|
||||
return sprintf(_('%1$s\'s favorite notices, page %2$d'),
|
||||
$this->user->nickname,
|
||||
$this->page);
|
||||
|
@ -92,7 +93,6 @@ class ShowfavoritesAction extends OwnerDesignAction
|
|||
*
|
||||
* @return boolean success flag
|
||||
*/
|
||||
|
||||
function prepare($args)
|
||||
{
|
||||
parent::prepare($args);
|
||||
|
@ -102,6 +102,7 @@ class ShowfavoritesAction extends OwnerDesignAction
|
|||
$this->user = User::staticGet('nickname', $nickname);
|
||||
|
||||
if (!$this->user) {
|
||||
// TRANS: Client error displayed when trying to display favourite notices for a non-existing user.
|
||||
$this->clientError(_('No such user.'));
|
||||
return false;
|
||||
}
|
||||
|
@ -129,6 +130,7 @@ class ShowfavoritesAction extends OwnerDesignAction
|
|||
}
|
||||
|
||||
if (empty($this->notice)) {
|
||||
// TRANS: Server error displayed when favourite notices could not be retrieved from the database.
|
||||
$this->serverError(_('Could not retrieve favorite notices.'));
|
||||
return;
|
||||
}
|
||||
|
@ -150,7 +152,6 @@ class ShowfavoritesAction extends OwnerDesignAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handle($args)
|
||||
{
|
||||
parent::handle($args);
|
||||
|
@ -162,12 +163,12 @@ class ShowfavoritesAction extends OwnerDesignAction
|
|||
*
|
||||
* @return array Feed objects to show
|
||||
*/
|
||||
|
||||
function getFeeds()
|
||||
{
|
||||
return array(new Feed(Feed::RSS1,
|
||||
common_local_url('favoritesrss',
|
||||
array('nickname' => $this->user->nickname)),
|
||||
// TRANS: Feed link text. %s is a username.
|
||||
sprintf(_('Feed for favorites of %s (RSS 1.0)'),
|
||||
$this->user->nickname)),
|
||||
new Feed(Feed::RSS2,
|
||||
|
@ -175,6 +176,7 @@ class ShowfavoritesAction extends OwnerDesignAction
|
|||
array(
|
||||
'id' => $this->user->nickname,
|
||||
'format' => 'rss')),
|
||||
// TRANS: Feed link text. %s is a username.
|
||||
sprintf(_('Feed for favorites of %s (RSS 2.0)'),
|
||||
$this->user->nickname)),
|
||||
new Feed(Feed::ATOM,
|
||||
|
@ -182,6 +184,7 @@ class ShowfavoritesAction extends OwnerDesignAction
|
|||
array(
|
||||
'id' => $this->user->nickname,
|
||||
'format' => 'atom')),
|
||||
// TRANS: Feed link text. %s is a username.
|
||||
sprintf(_('Feed for favorites of %s (Atom)'),
|
||||
$this->user->nickname)));
|
||||
}
|
||||
|
@ -191,7 +194,6 @@ class ShowfavoritesAction extends OwnerDesignAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showLocalNav()
|
||||
{
|
||||
$nav = new PersonalGroupNav($this);
|
||||
|
@ -203,12 +205,18 @@ class ShowfavoritesAction extends OwnerDesignAction
|
|||
if (common_logged_in()) {
|
||||
$current_user = common_current_user();
|
||||
if ($this->user->id === $current_user->id) {
|
||||
// TRANS: Text displayed instead of favourite notices for the current logged in user that has no favourites.
|
||||
$message = _('You haven\'t chosen any favorite notices yet. Click the fave button on notices you like to bookmark them for later or shed a spotlight on them.');
|
||||
} else {
|
||||
// TRANS: Text displayed instead of favourite notices for a user that has no favourites while logged in.
|
||||
// TRANS: %s is a username.
|
||||
$message = sprintf(_('%s hasn\'t added any favorite notices yet. Post something interesting they would add to their favorites :)'), $this->user->nickname);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// TRANS: Text displayed instead of favourite notices for a user that has no favourites while not logged in.
|
||||
// TRANS: %s is a username, %%%%action.register%%%% is a link to the user registration page.
|
||||
// TRANS: (link text)[link] is a Mark Down link.
|
||||
$message = sprintf(_('%s hasn\'t added any favorite notices yet. Why not [register an account](%%%%action.register%%%%) and then post something interesting they would add to their favorites :)'), $this->user->nickname);
|
||||
}
|
||||
|
||||
|
@ -224,7 +232,6 @@ class ShowfavoritesAction extends OwnerDesignAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showContent()
|
||||
{
|
||||
$nl = new FavoritesNoticeList($this->notice, $this);
|
||||
|
@ -240,6 +247,7 @@ class ShowfavoritesAction extends OwnerDesignAction
|
|||
}
|
||||
|
||||
function showPageNotice() {
|
||||
// TRANS: Page notice for show favourites page.
|
||||
$this->element('p', 'instructions', _('This is a way to share what you like.'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -532,7 +532,7 @@ class SmssettingsAction extends ConnectSettingsAction
|
|||
|
||||
if (!$code) {
|
||||
// TRANS: Message given saving SMS phone number confirmation code without having provided one.
|
||||
$this->showForm(_('No code entered'));
|
||||
$this->showForm(_('No code entered.'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -551,6 +551,7 @@ class SmssettingsAction extends ConnectSettingsAction
|
|||
$user = common_current_user();
|
||||
|
||||
if (!$user->incomingemail) {
|
||||
// TRANS: Form validation error displayed when trying to remove an incoming e-mail address while no address has been set.
|
||||
$this->showForm(_('No incoming email address.'));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -167,15 +167,14 @@ class SubscriptionsAction extends GalleryAction
|
|||
*
|
||||
* @return array of Feed objects
|
||||
*/
|
||||
|
||||
function getFeeds()
|
||||
{
|
||||
return array(new Feed(Feed::ATOM,
|
||||
common_local_url('AtomPubSubscriptionFeed',
|
||||
array('subscriber' => $this->profile->id)),
|
||||
// TRANS: Atom feed title. %s is a profile nickname.
|
||||
sprintf(_('Subscription feed for %s (Atom)'),
|
||||
$this->profile->nickname)));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -261,5 +260,4 @@ class SubscriptionsListItem extends SubscriptionListItem
|
|||
$this->out->elementEnd('form');
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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 AccountMover extends QueueHandler
|
||||
{
|
||||
function transport()
|
||||
|
@ -61,7 +60,9 @@ class AccountMover extends QueueHandler
|
|||
$oprofile = Ostatus_profile::ensureProfileURI($remote);
|
||||
|
||||
if (empty($oprofile)) {
|
||||
throw new Exception("Can't locate account {$remote}");
|
||||
// TRANS: Exception thrown when an account could not be located when it should be moved.
|
||||
// TRANS: %s is the remote site.
|
||||
throw new Exception(sprintf(_("Cannot locate account %s."),$remote));
|
||||
}
|
||||
|
||||
list($svcDocUrl, $username) = self::getServiceDocument($remote);
|
||||
|
@ -100,7 +101,9 @@ class AccountMover extends QueueHandler
|
|||
$xrd = $discovery->lookup($remote);
|
||||
|
||||
if (empty($xrd)) {
|
||||
throw new Exception("Can't find XRD for $remote");
|
||||
// TRANS: Exception thrown when a service document could not be located account move.
|
||||
// TRANS: %s is the remote site.
|
||||
throw new Exception(sprintf(_("Cannot find XRD for %s."),$remote));
|
||||
}
|
||||
|
||||
$svcDocUrl = null;
|
||||
|
@ -123,7 +126,9 @@ class AccountMover extends QueueHandler
|
|||
}
|
||||
|
||||
if (empty($svcDocUrl)) {
|
||||
throw new Exception("No AtomPub API service for $remote.");
|
||||
// TRANS: Exception thrown when an account could not be located when it should be moved.
|
||||
// TRANS: %s is the remote site.
|
||||
throw new Exception(sprintf(_("No AtomPub API service for %s."),$remote));
|
||||
}
|
||||
|
||||
return array($svcDocUrl, $username);
|
||||
|
@ -139,7 +144,6 @@ class AccountMover extends QueueHandler
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
protected function log($level, $message)
|
||||
{
|
||||
common_log($level, "AccountMover: " . $message);
|
||||
|
|
|
@ -546,33 +546,33 @@ class Action extends HTMLOutputter // lawsuit
|
|||
$this->elementStart('ul', array('class' => 'nav'));
|
||||
if (Event::handle('StartPrimaryNav', array($this))) {
|
||||
if ($user) {
|
||||
// TRANS: Tooltip for main menu option "Personal"
|
||||
// TRANS: Tooltip for main menu option "Personal".
|
||||
$tooltip = _m('TOOLTIP', 'Personal profile and friends timeline');
|
||||
$this->menuItem(common_local_url('all', array('nickname' => $user->nickname)),
|
||||
// TRANS: Main menu option when logged in for access to personal profile and friends timeline
|
||||
// TRANS: Main menu option when logged in for access to personal profile and friends timeline.
|
||||
_m('MENU', 'Personal'), $tooltip, false, 'nav_home');
|
||||
// TRANS: Tooltip for main menu option "Account"
|
||||
// TRANS: Tooltip for main menu option "Account".
|
||||
$tooltip = _m('TOOLTIP', 'Change your email, avatar, password, profile');
|
||||
$this->menuItem(common_local_url('profilesettings'),
|
||||
// TRANS: Main menu option when logged in for access to user settings
|
||||
// TRANS: Main menu option when logged in for access to user settings.
|
||||
_('Account'), $tooltip, false, 'nav_account');
|
||||
// TRANS: Tooltip for main menu option "Services"
|
||||
// TRANS: Tooltip for main menu option "Services".
|
||||
$tooltip = _m('TOOLTIP', 'Connect to services');
|
||||
$this->menuItem(common_local_url('oauthconnectionssettings'),
|
||||
// TRANS: Main menu option when logged in and connection are possible for access to options to connect to other services
|
||||
// TRANS: Main menu option when logged in and connection are possible for access to options to connect to other services.
|
||||
_('Connect'), $tooltip, false, 'nav_connect');
|
||||
if ($user->hasRight(Right::CONFIGURESITE)) {
|
||||
// TRANS: Tooltip for menu option "Admin"
|
||||
// TRANS: Tooltip for menu option "Admin".
|
||||
$tooltip = _m('TOOLTIP', 'Change site configuration');
|
||||
$this->menuItem(common_local_url('siteadminpanel'),
|
||||
// TRANS: Main menu option when logged in and site admin for access to site configuration
|
||||
// TRANS: Main menu option when logged in and site admin for access to site configuration.
|
||||
_m('MENU', 'Admin'), $tooltip, false, 'nav_admin');
|
||||
}
|
||||
if (common_config('invite', 'enabled')) {
|
||||
// TRANS: Tooltip for main menu option "Invite"
|
||||
// TRANS: Tooltip for main menu option "Invite".
|
||||
$tooltip = _m('TOOLTIP', 'Invite friends and colleagues to join you on %s');
|
||||
$this->menuItem(common_local_url('invite'),
|
||||
// TRANS: Main menu option when logged in and invitations are allowed for inviting new users
|
||||
// TRANS: Main menu option when logged in and invitations are allowed for inviting new users.
|
||||
_m('MENU', 'Invite'),
|
||||
sprintf($tooltip,
|
||||
common_config('site', 'name')),
|
||||
|
@ -581,33 +581,33 @@ class Action extends HTMLOutputter // lawsuit
|
|||
// TRANS: Tooltip for main menu option "Logout"
|
||||
$tooltip = _m('TOOLTIP', 'Logout from the site');
|
||||
$this->menuItem(common_local_url('logout'),
|
||||
// TRANS: Main menu option when logged in to log out the current user
|
||||
// TRANS: Main menu option when logged in to log out the current user.
|
||||
_m('MENU', 'Logout'), $tooltip, false, 'nav_logout');
|
||||
}
|
||||
else {
|
||||
if (!common_config('site', 'closed') && !common_config('site', 'inviteonly')) {
|
||||
// TRANS: Tooltip for main menu option "Register"
|
||||
// TRANS: Tooltip for main menu option "Register".
|
||||
$tooltip = _m('TOOLTIP', 'Create an account');
|
||||
$this->menuItem(common_local_url('register'),
|
||||
// TRANS: Main menu option when not logged in to register a new account
|
||||
// TRANS: Main menu option when not logged in to register a new account.
|
||||
_m('MENU', 'Register'), $tooltip, false, 'nav_register');
|
||||
}
|
||||
// TRANS: Tooltip for main menu option "Login"
|
||||
// TRANS: Tooltip for main menu option "Login".
|
||||
$tooltip = _m('TOOLTIP', 'Login to the site');
|
||||
$this->menuItem(common_local_url('login'),
|
||||
// TRANS: Main menu option when not logged in to log in
|
||||
// TRANS: Main menu option when not logged in to log in.
|
||||
_m('MENU', 'Login'), $tooltip, false, 'nav_login');
|
||||
}
|
||||
// TRANS: Tooltip for main menu option "Help"
|
||||
// TRANS: Tooltip for main menu option "Help".
|
||||
$tooltip = _m('TOOLTIP', 'Help me!');
|
||||
$this->menuItem(common_local_url('doc', array('title' => 'help')),
|
||||
// TRANS: Main menu option for help on the StatusNet site
|
||||
// TRANS: Main menu option for help on the StatusNet site.
|
||||
_m('MENU', 'Help'), $tooltip, false, 'nav_help');
|
||||
if ($user || !common_config('site', 'private')) {
|
||||
// TRANS: Tooltip for main menu option "Search"
|
||||
// TRANS: Tooltip for main menu option "Search".
|
||||
$tooltip = _m('TOOLTIP', 'Search for people or text');
|
||||
$this->menuItem(common_local_url('peoplesearch'),
|
||||
// TRANS: Main menu option when logged in or when the StatusNet instance is not private
|
||||
// TRANS: Main menu option when logged in or when the StatusNet instance is not private.
|
||||
_m('MENU', 'Search'), $tooltip, false, 'nav_search');
|
||||
}
|
||||
Event::handle('EndPrimaryNav', array($this));
|
||||
|
|
|
@ -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 ActivityMover extends QueueHandler
|
||||
{
|
||||
function transport()
|
||||
|
@ -82,7 +81,7 @@ class ActivityMover extends QueueHandler
|
|||
function moveActivity($act, $sink, $user, $remote)
|
||||
{
|
||||
if (empty($user)) {
|
||||
throw new Exception("No such user {$act->actor->id}");
|
||||
throw new Exception(sprintf(_("No such user %s."),$act->actor->id));
|
||||
}
|
||||
|
||||
switch ($act->verb) {
|
||||
|
@ -160,7 +159,6 @@ class ActivityMover extends QueueHandler
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
protected function log($level, $message)
|
||||
{
|
||||
common_log($level, "ActivityMover: " . $message);
|
||||
|
|
|
@ -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 ActivitySink
|
||||
{
|
||||
protected $svcDocUrl = null;
|
||||
|
@ -104,6 +103,7 @@ class ActivitySink
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$takesEntries) {
|
||||
continue;
|
||||
}
|
||||
|
@ -158,12 +158,18 @@ class ActivitySink
|
|||
if ($status >= 200 && $status < 300) {
|
||||
return true;
|
||||
} else if ($status >= 400 && $status < 500) {
|
||||
throw new ClientException("{$url} {$status} {$reason}");
|
||||
// TRANS: Client exception thrown when post to collection fails with a 400 status.
|
||||
// TRANS: %1$s is a URL, %2$s is the status, %s$s is the fail reason.
|
||||
throw new ClientException(sprintf(_m('URLSTATUSREASON','%1$s %2$s %3$s'), $url, $status, $reason));
|
||||
} else if ($status >= 500 && $status < 600) {
|
||||
throw new ServerException("{$url} {$status} {$reason}");
|
||||
// TRANS: Server exception thrown when post to collection fails with a 500 status.
|
||||
// TRANS: %1$s is a URL, %2$s is the status, %s$s is the fail reason.
|
||||
throw new ServerException(sprintf(_m('URLSTATUSREASON','%1$s %2$s %3$s'), $url, $status, $reason));
|
||||
} else {
|
||||
// That's unexpected.
|
||||
throw new Exception("{$url} {$status} {$reason}");
|
||||
// TRANS: Exception thrown when post to collection fails with a status that is not handled.
|
||||
// TRANS: %1$s is a URL, %2$s is the status, %s$s is the fail reason.
|
||||
throw new Exception(sprintf(_m('URLSTATUSREASON','%1$s %2$s %3$s'), $url, $status, $reason));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,6 @@ if (!defined('STATUSNET')) {
|
|||
*
|
||||
* @see http://groups.google.com/group/webfinger/browse_thread/thread/9f3d93a479e91bbf
|
||||
*/
|
||||
|
||||
class Discovery
|
||||
{
|
||||
const LRDD_REL = 'lrdd';
|
||||
|
@ -77,7 +76,6 @@ class Discovery
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
public function registerMethod($class)
|
||||
{
|
||||
$this->methods[] = $class;
|
||||
|
@ -91,7 +89,6 @@ class Discovery
|
|||
*
|
||||
* @return string normalized acct: or http(s)?: URI
|
||||
*/
|
||||
|
||||
public static function normalize($user_id)
|
||||
{
|
||||
if (substr($user_id, 0, 5) == 'http:' ||
|
||||
|
@ -116,7 +113,6 @@ class Discovery
|
|||
*
|
||||
* @return boolean true if $user_id is a Webfinger, else false
|
||||
*/
|
||||
|
||||
public static function isWebfinger($user_id)
|
||||
{
|
||||
$uri = Discovery::normalize($user_id);
|
||||
|
@ -131,7 +127,6 @@ class Discovery
|
|||
*
|
||||
* @return XRD XRD object for the user
|
||||
*/
|
||||
|
||||
public function lookup($id)
|
||||
{
|
||||
// Normalize the incoming $id to make sure we have a uri
|
||||
|
@ -154,7 +149,7 @@ class Discovery
|
|||
}
|
||||
}
|
||||
|
||||
// TRANS: Exception.
|
||||
// TRANS: Exception. %s is an ID.
|
||||
throw new Exception(sprintf(_('Unable to find services for %s.'), $id));
|
||||
}
|
||||
|
||||
|
@ -166,7 +161,6 @@ class Discovery
|
|||
*
|
||||
* @return array $link assoc array representing the link
|
||||
*/
|
||||
|
||||
public static function getService($links, $service)
|
||||
{
|
||||
if (!is_array($links)) {
|
||||
|
@ -190,7 +184,6 @@ class Discovery
|
|||
*
|
||||
* @return string replaced values
|
||||
*/
|
||||
|
||||
public static function applyTemplate($template, $id)
|
||||
{
|
||||
$template = str_replace('{uri}', urlencode($id), $template);
|
||||
|
@ -205,7 +198,6 @@ class Discovery
|
|||
*
|
||||
* @return XRD object representing the XRD file
|
||||
*/
|
||||
|
||||
public static function fetchXrd($url)
|
||||
{
|
||||
try {
|
||||
|
@ -236,7 +228,6 @@ class Discovery
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
interface Discovery_LRDD
|
||||
{
|
||||
/**
|
||||
|
@ -246,7 +237,6 @@ interface Discovery_LRDD
|
|||
*
|
||||
* @return array Links in the XRD file
|
||||
*/
|
||||
|
||||
public function discover($uri);
|
||||
}
|
||||
|
||||
|
@ -263,7 +253,6 @@ interface Discovery_LRDD
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class Discovery_LRDD_Host_Meta implements Discovery_LRDD
|
||||
{
|
||||
/**
|
||||
|
@ -276,7 +265,6 @@ class Discovery_LRDD_Host_Meta implements Discovery_LRDD
|
|||
*
|
||||
* @return array Links in the XRD file
|
||||
*/
|
||||
|
||||
public function discover($uri)
|
||||
{
|
||||
if (Discovery::isWebfinger($uri)) {
|
||||
|
@ -313,7 +301,6 @@ class Discovery_LRDD_Host_Meta implements Discovery_LRDD
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class Discovery_LRDD_Link_Header implements Discovery_LRDD
|
||||
{
|
||||
/**
|
||||
|
@ -327,7 +314,6 @@ class Discovery_LRDD_Link_Header implements Discovery_LRDD
|
|||
*
|
||||
* @todo fail out of Webfinger URIs faster
|
||||
*/
|
||||
|
||||
public function discover($uri)
|
||||
{
|
||||
try {
|
||||
|
@ -356,7 +342,6 @@ class Discovery_LRDD_Link_Header implements Discovery_LRDD
|
|||
*
|
||||
* @return array Link header in XRD-like format
|
||||
*/
|
||||
|
||||
protected static function parseHeader($header)
|
||||
{
|
||||
$lh = new LinkHeader($header);
|
||||
|
@ -380,7 +365,6 @@ class Discovery_LRDD_Link_Header implements Discovery_LRDD
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class Discovery_LRDD_Link_HTML implements Discovery_LRDD
|
||||
{
|
||||
/**
|
||||
|
@ -395,7 +379,6 @@ class Discovery_LRDD_Link_HTML implements Discovery_LRDD
|
|||
*
|
||||
* @todo fail out of Webfinger URIs faster
|
||||
*/
|
||||
|
||||
public function discover($uri)
|
||||
{
|
||||
try {
|
||||
|
@ -421,7 +404,6 @@ class Discovery_LRDD_Link_HTML implements Discovery_LRDD
|
|||
*
|
||||
* @return array array of associative arrays in XRD-ish format
|
||||
*/
|
||||
|
||||
public function parse($html)
|
||||
{
|
||||
$links = array();
|
||||
|
|
|
@ -46,13 +46,11 @@ require_once INSTALLDIR.'/lib/form.php';
|
|||
*
|
||||
* @see FavorForm
|
||||
*/
|
||||
|
||||
class DisfavorForm extends Form
|
||||
{
|
||||
/**
|
||||
* Notice to disfavor
|
||||
*/
|
||||
|
||||
var $notice = null;
|
||||
|
||||
/**
|
||||
|
@ -61,7 +59,6 @@ class DisfavorForm extends Form
|
|||
* @param HTMLOutputter $out output channel
|
||||
* @param Notice $notice notice to disfavor
|
||||
*/
|
||||
|
||||
function __construct($out=null, $notice=null)
|
||||
{
|
||||
parent::__construct($out);
|
||||
|
@ -74,7 +71,6 @@ class DisfavorForm extends Form
|
|||
*
|
||||
* @return int ID of the form
|
||||
*/
|
||||
|
||||
function id()
|
||||
{
|
||||
return 'disfavor-' . $this->notice->id;
|
||||
|
@ -85,7 +81,6 @@ class DisfavorForm extends Form
|
|||
*
|
||||
* @return string URL of the action
|
||||
*/
|
||||
|
||||
function action()
|
||||
{
|
||||
return common_local_url('disfavor');
|
||||
|
@ -96,14 +91,12 @@ class DisfavorForm extends Form
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function sessionToken()
|
||||
{
|
||||
$this->out->hidden('token-' . $this->notice->id,
|
||||
common_session_token());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Legend of the Form
|
||||
*
|
||||
|
@ -111,10 +104,10 @@ class DisfavorForm extends Form
|
|||
*/
|
||||
function formLegend()
|
||||
{
|
||||
// TRANS: Form legend for removing the favourite status for a favourite notice.
|
||||
$this->out->element('legend', null, _('Disfavor this notice'));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Data elements
|
||||
*
|
||||
|
@ -129,7 +122,6 @@ class DisfavorForm extends Form
|
|||
'notice');
|
||||
Event::handle('EndDisFavorNoticeForm', array($this, $this->notice));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -137,11 +129,15 @@ class DisfavorForm extends Form
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function formActions()
|
||||
{
|
||||
$this->out->submit('disfavor-submit-' . $this->notice->id,
|
||||
_('Disfavor favorite'), 'submit', null, _('Disfavor this notice'));
|
||||
// TRANS: Button text for removing the favourite status for a favourite notice.
|
||||
_m('BUTTON','Disfavor favorite'),
|
||||
'submit',
|
||||
null,
|
||||
// TRANS: Title for button text for removing the favourite status for a favourite notice.
|
||||
_('Disfavor this notice'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -149,10 +145,8 @@ class DisfavorForm extends Form
|
|||
*
|
||||
* @return string the form's class
|
||||
*/
|
||||
|
||||
function formClass()
|
||||
{
|
||||
return 'form_disfavor';
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -46,13 +46,11 @@ require_once INSTALLDIR.'/lib/form.php';
|
|||
*
|
||||
* @see DisfavorForm
|
||||
*/
|
||||
|
||||
class FavorForm extends Form
|
||||
{
|
||||
/**
|
||||
* Notice to favor
|
||||
*/
|
||||
|
||||
var $notice = null;
|
||||
|
||||
/**
|
||||
|
@ -61,7 +59,6 @@ class FavorForm extends Form
|
|||
* @param HTMLOutputter $out output channel
|
||||
* @param Notice $notice notice to favor
|
||||
*/
|
||||
|
||||
function __construct($out=null, $notice=null)
|
||||
{
|
||||
parent::__construct($out);
|
||||
|
@ -74,7 +71,6 @@ class FavorForm extends Form
|
|||
*
|
||||
* @return int ID of the form
|
||||
*/
|
||||
|
||||
function id()
|
||||
{
|
||||
return 'favor-' . $this->notice->id;
|
||||
|
@ -85,7 +81,6 @@ class FavorForm extends Form
|
|||
*
|
||||
* @return string URL of the action
|
||||
*/
|
||||
|
||||
function action()
|
||||
{
|
||||
return common_local_url('favor');
|
||||
|
@ -96,14 +91,12 @@ class FavorForm extends Form
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function sessionToken()
|
||||
{
|
||||
$this->out->hidden('token-' . $this->notice->id,
|
||||
common_session_token());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Legend of the Form
|
||||
*
|
||||
|
@ -111,16 +104,15 @@ class FavorForm extends Form
|
|||
*/
|
||||
function formLegend()
|
||||
{
|
||||
// TRANS: Form legend for adding the favourite status to a notice.
|
||||
$this->out->element('legend', null, _('Favor this notice'));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Data elements
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function formData()
|
||||
{
|
||||
if (Event::handle('StartFavorNoticeForm', array($this, $this->notice))) {
|
||||
|
@ -136,11 +128,15 @@ class FavorForm extends Form
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function formActions()
|
||||
{
|
||||
$this->out->submit('favor-submit-' . $this->notice->id,
|
||||
_('Favor'), 'submit', null, _('Favor this notice'));
|
||||
// TRANS: Button text for adding the favourite status to a notice.
|
||||
_m('BUTTON','Favor'),
|
||||
'submit',
|
||||
null,
|
||||
// TRANS: Title for button text for adding the favourite status to a notice.
|
||||
_('Favor this notice'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -148,7 +144,6 @@ class FavorForm extends Form
|
|||
*
|
||||
* @return string the form's class
|
||||
*/
|
||||
|
||||
function formClass()
|
||||
{
|
||||
return 'form_favor';
|
||||
|
|
|
@ -40,7 +40,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class FeaturedUsersSection extends ProfileSection
|
||||
{
|
||||
function getProfiles()
|
||||
|
@ -84,6 +83,7 @@ class FeaturedUsersSection extends ProfileSection
|
|||
|
||||
function title()
|
||||
{
|
||||
// TRANS: Title for featured users section.
|
||||
return _('Featured users');
|
||||
}
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@ class ImageFile
|
|||
($info[2] == IMAGETYPE_XBM && function_exists('imagecreatefromxbm')) ||
|
||||
($info[2] == IMAGETYPE_PNG && function_exists('imagecreatefrompng')))) {
|
||||
|
||||
// TRANS: Exception thrown when trying to upload an unsupported image file format.
|
||||
throw new Exception(_('Unsupported image file format.'));
|
||||
return;
|
||||
}
|
||||
|
@ -92,6 +93,7 @@ class ImageFile
|
|||
return;
|
||||
case UPLOAD_ERR_PARTIAL:
|
||||
@unlink($_FILES[$param]['tmp_name']);
|
||||
// TRANS: Exception thrown when uploading an image and that action could not be completed.
|
||||
throw new Exception(_('Partial upload.'));
|
||||
return;
|
||||
case UPLOAD_ERR_NO_FILE:
|
||||
|
@ -100,6 +102,7 @@ class ImageFile
|
|||
default:
|
||||
common_log(LOG_ERR, __METHOD__ . ": Unknown upload error " .
|
||||
$_FILES[$param]['error']);
|
||||
// TRANS: Exception thrown when uploading an image fails for an unknown reason.
|
||||
throw new Exception(_('System error uploading file.'));
|
||||
return;
|
||||
}
|
||||
|
@ -108,6 +111,7 @@ class ImageFile
|
|||
|
||||
if (!$info) {
|
||||
@unlink($_FILES[$param]['tmp_name']);
|
||||
// TRANS: Exception thrown when uploading a file as image that is not an image or is a corrupt file.
|
||||
throw new Exception(_('Not an image or corrupt file.'));
|
||||
return;
|
||||
}
|
||||
|
@ -170,6 +174,7 @@ class ImageFile
|
|||
$targetType = $this->preferredType();
|
||||
|
||||
if (!file_exists($this->filepath)) {
|
||||
// TRANS: Exception thrown during resize when image has been registered as present, but is no longer there.
|
||||
throw new Exception(_('Lost our file.'));
|
||||
return;
|
||||
}
|
||||
|
@ -207,6 +212,7 @@ class ImageFile
|
|||
$image_src = imagecreatefromxbm($this->filepath);
|
||||
break;
|
||||
default:
|
||||
// TRANS: Exception thrown when trying to resize an unknown file type.
|
||||
throw new Exception(_('Unknown file type'));
|
||||
return;
|
||||
}
|
||||
|
@ -247,6 +253,7 @@ class ImageFile
|
|||
imagepng($image_dest, $outpath);
|
||||
break;
|
||||
default:
|
||||
// TRANS: Exception thrown when trying resize an unknown file type.
|
||||
throw new Exception(_('Unknown file type'));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,6 @@ if (!defined('STATUSNET')) {
|
|||
*
|
||||
* @see Discovery
|
||||
*/
|
||||
|
||||
class LinkHeader
|
||||
{
|
||||
var $href;
|
||||
|
@ -61,7 +60,6 @@ class LinkHeader
|
|||
*
|
||||
* @return LinkHeader self
|
||||
*/
|
||||
|
||||
function __construct($str)
|
||||
{
|
||||
preg_match('/^<[^>]+>/', $str, $uri_reference);
|
||||
|
@ -108,7 +106,6 @@ class LinkHeader
|
|||
*
|
||||
* @return LinkHeader discovered header, or null on failure
|
||||
*/
|
||||
|
||||
static function getLink($response, $rel=null, $type=null)
|
||||
{
|
||||
$headers = $response->getHeader('Link');
|
||||
|
|
|
@ -44,7 +44,6 @@ require_once INSTALLDIR.'/lib/widget.php';
|
|||
*
|
||||
* @see Widget
|
||||
*/
|
||||
|
||||
class LoginGroupNav extends Widget
|
||||
{
|
||||
var $action = null;
|
||||
|
@ -54,7 +53,6 @@ class LoginGroupNav extends Widget
|
|||
*
|
||||
* @param Action $action current action, used for output
|
||||
*/
|
||||
|
||||
function __construct($action=null)
|
||||
{
|
||||
parent::__construct($action);
|
||||
|
@ -66,7 +64,6 @@ class LoginGroupNav extends Widget
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function show()
|
||||
{
|
||||
$action_name = $this->action->trimmed('action');
|
||||
|
@ -76,13 +73,17 @@ class LoginGroupNav extends Widget
|
|||
if (Event::handle('StartLoginGroupNav', array($this->action))) {
|
||||
|
||||
$this->action->menuItem(common_local_url('login'),
|
||||
_('Login'),
|
||||
// TRANS: Menu item for logging in to the StatusNet site.
|
||||
_m('MENU','Login'),
|
||||
// TRANS: Title for menu item for logging in to the StatusNet site.
|
||||
_('Login with a username and password'),
|
||||
$action_name === 'login');
|
||||
|
||||
if (!(common_config('site','closed') || common_config('site','inviteonly'))) {
|
||||
$this->action->menuItem(common_local_url('register'),
|
||||
_('Register'),
|
||||
// TRANS: Menu item for registering with the StatusNet site.
|
||||
_m('MENU','Register'),
|
||||
// TRANS: Title for menu item for registering with the StatusNet site.
|
||||
_('Sign up for a new account'),
|
||||
$action_name === 'register');
|
||||
}
|
||||
|
|
10
lib/mail.php
10
lib/mail.php
|
@ -44,7 +44,6 @@ require_once 'Mail.php';
|
|||
*
|
||||
* @return Mail backend
|
||||
*/
|
||||
|
||||
function mail_backend()
|
||||
{
|
||||
static $backend = null;
|
||||
|
@ -70,7 +69,6 @@ function mail_backend()
|
|||
*
|
||||
* @return boolean success flag
|
||||
*/
|
||||
|
||||
function mail_send($recipients, $headers, $body)
|
||||
{
|
||||
// XXX: use Mail_Queue... maybe
|
||||
|
@ -94,7 +92,6 @@ function mail_send($recipients, $headers, $body)
|
|||
*
|
||||
* @return string mail domain, suitable for making email addresses.
|
||||
*/
|
||||
|
||||
function mail_domain()
|
||||
{
|
||||
$maildomain = common_config('mail', 'domain');
|
||||
|
@ -112,7 +109,6 @@ function mail_domain()
|
|||
*
|
||||
* @return string notify from address
|
||||
*/
|
||||
|
||||
function mail_notify_from()
|
||||
{
|
||||
$notifyfrom = common_config('mail', 'notifyfrom');
|
||||
|
@ -138,7 +134,6 @@ function mail_notify_from()
|
|||
*
|
||||
* @return boolean success flag
|
||||
*/
|
||||
|
||||
function mail_to_user(&$user, $subject, $body, $headers=array(), $address=null)
|
||||
{
|
||||
if (!$address) {
|
||||
|
@ -167,7 +162,6 @@ function mail_to_user(&$user, $subject, $body, $headers=array(), $address=null)
|
|||
*
|
||||
* @return success flag
|
||||
*/
|
||||
|
||||
function mail_confirm_address($user, $code, $nickname, $address)
|
||||
{
|
||||
// TRANS: Subject for address confirmation email.
|
||||
|
@ -202,7 +196,6 @@ function mail_confirm_address($user, $code, $nickname, $address)
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function mail_subscribe_notify($listenee, $listener)
|
||||
{
|
||||
$other = $listener->getProfile();
|
||||
|
@ -220,7 +213,6 @@ function mail_subscribe_notify($listenee, $listener)
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function mail_subscribe_notify_profile($listenee, $other)
|
||||
{
|
||||
if ($other->hasRight(Right::EMAILONSUBSCRIBE) &&
|
||||
|
@ -490,7 +482,7 @@ function mail_notify_nudge($from, $to)
|
|||
common_switch_locale($to->language);
|
||||
// TRANS: Subject for 'nudge' notification email.
|
||||
// TRANS: %s is the nudging user.
|
||||
$subject = sprintf(_('You\'ve been nudged by %s'), $from->nickname);
|
||||
$subject = sprintf(_('You have been nudged by %s'), $from->nickname);
|
||||
|
||||
$from_profile = $from->getProfile();
|
||||
|
||||
|
|
|
@ -52,7 +52,6 @@ require_once INSTALLDIR.'/lib/widget.php';
|
|||
*
|
||||
* @see HTMLOutputter
|
||||
*/
|
||||
|
||||
class PersonalGroupNav extends Widget
|
||||
{
|
||||
var $action = null;
|
||||
|
@ -62,7 +61,6 @@ class PersonalGroupNav extends Widget
|
|||
*
|
||||
* @param Action $action current action, used for output
|
||||
*/
|
||||
|
||||
function __construct($action=null)
|
||||
{
|
||||
parent::__construct($action);
|
||||
|
@ -74,7 +72,6 @@ class PersonalGroupNav extends Widget
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function show()
|
||||
{
|
||||
$user = null;
|
||||
|
@ -99,22 +96,29 @@ class PersonalGroupNav extends Widget
|
|||
if (Event::handle('StartPersonalGroupNav', array($this))) {
|
||||
$this->out->menuItem(common_local_url('all', array('nickname' =>
|
||||
$nickname)),
|
||||
_('Personal'),
|
||||
// TRANS: Personal group navigation menu option when logged in for viewing timeline of self and friends.
|
||||
_m('MENU','Personal'),
|
||||
// TRANS: Tooltop for personal group navigation menu option when logged in for viewing timeline of self and friends.
|
||||
sprintf(_('%s and friends'), $name),
|
||||
$action == 'all', 'nav_timeline_personal');
|
||||
$this->out->menuItem(common_local_url('replies', array('nickname' =>
|
||||
$nickname)),
|
||||
_('Replies'),
|
||||
// TRANS: Personal group navigation menu option when logged in for viewing @-replies.
|
||||
_m('MENU','Replies'),
|
||||
// TRANS: Tooltip for personal group navigation menu option when logged in for viewing @-replies.
|
||||
sprintf(_('Replies to %s'), $name),
|
||||
$action == 'replies', 'nav_timeline_replies');
|
||||
$this->out->menuItem(common_local_url('showstream', array('nickname' =>
|
||||
$nickname)),
|
||||
_('Profile'),
|
||||
// TRANS: Personal group navigation menu option when logged in for seeing own profile.
|
||||
_m('MENU','Profile'),
|
||||
$name,
|
||||
$action == 'showstream', 'nav_profile');
|
||||
$this->out->menuItem(common_local_url('showfavorites', array('nickname' =>
|
||||
$nickname)),
|
||||
_('Favorites'),
|
||||
// TRANS: Personal group navigation menu option when logged in for viewing own favourited notices.
|
||||
_m('MENU','Favorites'),
|
||||
// TRANS: Tooltip for personal group navigation menu option when logged in for viewing own favourited notices.
|
||||
sprintf(_('%s\'s favorite notices'), ($user_profile) ? $name : _('User')),
|
||||
$action == 'showfavorites', 'nav_timeline_favorites');
|
||||
|
||||
|
@ -125,12 +129,16 @@ class PersonalGroupNav extends Widget
|
|||
|
||||
$this->out->menuItem(common_local_url('inbox', array('nickname' =>
|
||||
$nickname)),
|
||||
_('Inbox'),
|
||||
// TRANS: Personal group navigation menu option when logged in for viewing recieved personal messages.
|
||||
_m('MENU','Inbox'),
|
||||
// TRANS: Tooltip for personal group navigation menu option when logged in for viewing recieved personal messages.
|
||||
_('Your incoming messages'),
|
||||
$action == 'inbox');
|
||||
$this->out->menuItem(common_local_url('outbox', array('nickname' =>
|
||||
$nickname)),
|
||||
_('Outbox'),
|
||||
// TRANS: Personal group navigation menu option when logged in for viewing senet personal messages.
|
||||
_m('MENU','Outbox'),
|
||||
// TRANS: Tooltip for personal group navigation menu option when logged in for viewing senet personal messages.
|
||||
_('Your sent messages'),
|
||||
$action == 'outbox');
|
||||
}
|
||||
|
|
|
@ -40,7 +40,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class PersonalTagCloudSection extends TagCloudSection
|
||||
{
|
||||
var $user = null;
|
||||
|
@ -53,6 +52,7 @@ class PersonalTagCloudSection extends TagCloudSection
|
|||
|
||||
function title()
|
||||
{
|
||||
// TRANS: Title for personal tag cloud section. %s is a user nickname.
|
||||
return sprintf(_('Tags in %s\'s notices'), $this->user->nickname);
|
||||
}
|
||||
|
||||
|
@ -84,5 +84,4 @@ class PersonalTagCloudSection extends TagCloudSection
|
|||
3600);
|
||||
return $tag;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -43,7 +43,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class PopularNoticeSection extends NoticeSection
|
||||
{
|
||||
function getNotices()
|
||||
|
@ -59,6 +58,7 @@ class PopularNoticeSection extends NoticeSection
|
|||
|
||||
function title()
|
||||
{
|
||||
// TRANS: Title for favourited notices section.
|
||||
return _('Popular notices');
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ require_once INSTALLDIR.'/lib/groupminilist.php';
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class ProfileAction extends OwnerDesignAction
|
||||
{
|
||||
var $page = null;
|
||||
|
@ -74,6 +73,7 @@ class ProfileAction extends OwnerDesignAction
|
|||
$this->user = User::staticGet('nickname', $nickname);
|
||||
|
||||
if (!$this->user) {
|
||||
// TRANS: Client error displayed when calling a profile action without specifying a user.
|
||||
$this->clientError(_('No such user.'), 404);
|
||||
return false;
|
||||
}
|
||||
|
@ -81,6 +81,7 @@ class ProfileAction extends OwnerDesignAction
|
|||
$this->profile = $this->user->getProfile();
|
||||
|
||||
if (!$this->profile) {
|
||||
// TRANS: Server error displayed when calling a profile action while the specified user does not have a profile.
|
||||
$this->serverError(_('User has no profile.'));
|
||||
return false;
|
||||
}
|
||||
|
@ -122,6 +123,7 @@ class ProfileAction extends OwnerDesignAction
|
|||
'class' => 'section'));
|
||||
if (Event::handle('StartShowSubscriptionsMiniList', array($this))) {
|
||||
$this->elementStart('h2');
|
||||
// TRANS: H2 text for user subscription statistics.
|
||||
$this->statsSectionLink('subscriptions', _('Subscriptions'));
|
||||
$this->elementEnd('h2');
|
||||
|
||||
|
@ -131,12 +133,14 @@ class ProfileAction extends OwnerDesignAction
|
|||
$pml = new ProfileMiniList($profile, $this);
|
||||
$cnt = $pml->show();
|
||||
if ($cnt == 0) {
|
||||
// TRANS: Text for user subscription statistics if the user has no subscriptions.
|
||||
$this->element('p', null, _('(None)'));
|
||||
}
|
||||
}
|
||||
|
||||
if ($cnt > PROFILES_PER_MINILIST) {
|
||||
$this->elementStart('p');
|
||||
// TRANS: Text for user subscription statistics if user has more subscriptions than displayed.
|
||||
$this->statsSectionLink('subscriptions', _('All subscriptions'), 'more');
|
||||
$this->elementEnd('p');
|
||||
}
|
||||
|
@ -156,6 +160,7 @@ class ProfileAction extends OwnerDesignAction
|
|||
if (Event::handle('StartShowSubscribersMiniList', array($this))) {
|
||||
|
||||
$this->elementStart('h2');
|
||||
// TRANS: H2 text for user subscriber statistics.
|
||||
$this->statsSectionLink('subscribers', _('Subscribers'));
|
||||
$this->elementEnd('h2');
|
||||
|
||||
|
@ -165,12 +170,14 @@ class ProfileAction extends OwnerDesignAction
|
|||
$sml = new SubscribersMiniList($profile, $this);
|
||||
$cnt = $sml->show();
|
||||
if ($cnt == 0) {
|
||||
// TRANS: Text for user subscriber statistics if user has no subscribers.
|
||||
$this->element('p', null, _('(None)'));
|
||||
}
|
||||
}
|
||||
|
||||
if ($cnt > PROFILES_PER_MINILIST) {
|
||||
$this->elementStart('p');
|
||||
// TRANS: Text for user subscription statistics if user has more subscribers than displayed.
|
||||
$this->statsSectionLink('subscribers', _('All subscribers'), 'more');
|
||||
$this->elementEnd('p');
|
||||
}
|
||||
|
@ -194,6 +201,7 @@ class ProfileAction extends OwnerDesignAction
|
|||
$this->elementStart('div', array('id' => 'entity_statistics',
|
||||
'class' => 'section'));
|
||||
|
||||
// TRANS: H2 text for user statistics.
|
||||
$this->element('h2', null, _('Statistics'));
|
||||
|
||||
$profile = $this->profile;
|
||||
|
@ -201,40 +209,47 @@ class ProfileAction extends OwnerDesignAction
|
|||
$stats = array(
|
||||
array(
|
||||
'id' => 'user-id',
|
||||
// TRANS: Label for user statistics.
|
||||
'label' => _('User ID'),
|
||||
'value' => $profile->id,
|
||||
),
|
||||
array(
|
||||
'id' => 'member-since',
|
||||
// TRANS: Label for user statistics.
|
||||
'label' => _('Member since'),
|
||||
'value' => date('j M Y', strtotime($profile->created))
|
||||
),
|
||||
array(
|
||||
'id' => 'subscriptions',
|
||||
// TRANS: Label for user statistics.
|
||||
'label' => _('Subscriptions'),
|
||||
'link' => common_local_url('subscriptions', $actionParams),
|
||||
'value' => $profile->subscriptionCount(),
|
||||
),
|
||||
array(
|
||||
'id' => 'subscribers',
|
||||
// TRANS: Label for user statistics.
|
||||
'label' => _('Subscribers'),
|
||||
'link' => common_local_url('subscribers', $actionParams),
|
||||
'value' => $profile->subscriberCount(),
|
||||
),
|
||||
array(
|
||||
'id' => 'groups',
|
||||
// TRANS: Label for user statistics.
|
||||
'label' => _('Groups'),
|
||||
'link' => common_local_url('usergroups', $actionParams),
|
||||
'value' => $profile->getGroups()->N,
|
||||
),
|
||||
array(
|
||||
'id' => 'notices',
|
||||
// TRANS: Label for user statistics.
|
||||
'label' => _('Notices'),
|
||||
'value' => $notice_count,
|
||||
),
|
||||
array(
|
||||
'id' => 'daily_notices',
|
||||
// TRANS: Average count of posts made per day since account registration
|
||||
// TRANS: Label for user statistics.
|
||||
// TRANS: Average count of posts made per day since account registration.
|
||||
'label' => _('Daily average'),
|
||||
'value' => $daily_count
|
||||
)
|
||||
|
@ -271,6 +286,7 @@ class ProfileAction extends OwnerDesignAction
|
|||
'class' => 'section'));
|
||||
if (Event::handle('StartShowGroupsMiniList', array($this))) {
|
||||
$this->elementStart('h2');
|
||||
// TRANS: H2 text for user group membership statistics.
|
||||
$this->statsSectionLink('usergroups', _('Groups'));
|
||||
$this->elementEnd('h2');
|
||||
|
||||
|
@ -278,12 +294,14 @@ class ProfileAction extends OwnerDesignAction
|
|||
$gml = new GroupMiniList($groups, $this->profile, $this);
|
||||
$cnt = $gml->show();
|
||||
if ($cnt == 0) {
|
||||
// TRANS: Text for user user group membership statistics if user is not a member of any group.
|
||||
$this->element('p', null, _('(None)'));
|
||||
}
|
||||
}
|
||||
|
||||
if ($cnt > GROUPS_PER_MINILIST) {
|
||||
$this->elementStart('p');
|
||||
// TRANS: Text for user group membership statistics if user has more subscriptions than displayed.
|
||||
$this->statsSectionLink('usergroups', _('All groups'), 'more');
|
||||
$this->elementEnd('p');
|
||||
}
|
||||
|
@ -313,4 +331,3 @@ class SubscribersMiniListItem extends ProfileMiniListItem
|
|||
return $aAttrs;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class ProfileFormAction extends RedirectingAction
|
||||
{
|
||||
var $profile = null;
|
||||
|
@ -52,7 +51,6 @@ class ProfileFormAction extends RedirectingAction
|
|||
*
|
||||
* @return boolean success flag
|
||||
*/
|
||||
|
||||
function prepare($args)
|
||||
{
|
||||
parent::prepare($args);
|
||||
|
@ -61,6 +59,7 @@ class ProfileFormAction extends RedirectingAction
|
|||
|
||||
if (!common_logged_in()) {
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
// TRANS: Client error displayed when trying to change user options while not logged in.
|
||||
$this->clientError(_('Not logged in.'));
|
||||
} else {
|
||||
// Redirect to login.
|
||||
|
@ -76,6 +75,7 @@ class ProfileFormAction extends RedirectingAction
|
|||
$id = $this->trimmed('profileid');
|
||||
|
||||
if (!$id) {
|
||||
// TRANS: Client error displayed when trying to change user options without specifying a user to work on.
|
||||
$this->clientError(_('No profile specified.'));
|
||||
return false;
|
||||
}
|
||||
|
@ -83,6 +83,7 @@ class ProfileFormAction extends RedirectingAction
|
|||
$this->profile = Profile::staticGet('id', $id);
|
||||
|
||||
if (!$this->profile) {
|
||||
// TRANS: Client error displayed when trying to change user options without specifying an existing user to work on.
|
||||
$this->clientError(_('No profile with that ID.'));
|
||||
return false;
|
||||
}
|
||||
|
@ -99,7 +100,6 @@ class ProfileFormAction extends RedirectingAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handle($args)
|
||||
{
|
||||
parent::handle($args);
|
||||
|
@ -117,9 +117,9 @@ class ProfileFormAction extends RedirectingAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handlePost()
|
||||
{
|
||||
// TRANS: Server error displayed when using an unimplemented method.
|
||||
$this->serverError(_("Unimplemented method."));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* We extend atomusernoticefeed since it does some nice setup for us.
|
||||
*
|
||||
*/
|
||||
|
||||
class UserActivityStream extends AtomUserNoticeFeed
|
||||
{
|
||||
public $activities = array();
|
||||
|
|
|
@ -48,7 +48,6 @@ require_once INSTALLDIR.'/lib/widget.php';
|
|||
*
|
||||
* @see HTMLOutputter
|
||||
*/
|
||||
|
||||
class UserProfile extends Widget
|
||||
{
|
||||
var $user = null;
|
||||
|
@ -73,6 +72,7 @@ class UserProfile extends Widget
|
|||
|
||||
$this->out->elementStart('div', array('id' => 'i',
|
||||
'class' => 'entity_profile vcard author'));
|
||||
// TRANS: H2 for user profile information.
|
||||
$this->out->element('h2', null, _('User profile'));
|
||||
|
||||
if (Event::handle('StartProfilePageProfileElements', array(&$this->out, $this->profile))) {
|
||||
|
@ -104,6 +104,7 @@ class UserProfile extends Widget
|
|||
}
|
||||
|
||||
$this->out->elementStart('dl', 'entity_depiction');
|
||||
// TRANS: DT element in area for user avatar.
|
||||
$this->out->element('dt', null, _('Photo'));
|
||||
$this->out->elementStart('dd');
|
||||
$this->out->element('img', array('src' => ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_PROFILE_SIZE),
|
||||
|
@ -116,6 +117,7 @@ class UserProfile extends Widget
|
|||
$cur = common_current_user();
|
||||
if ($cur && $cur->id == $this->profile->id) {
|
||||
$this->out->elementStart('dd');
|
||||
// TRANS: Link text for changeing the avatar of the logged in user.
|
||||
$this->out->element('a', array('href' => common_local_url('avatarsettings')), _('Edit Avatar'));
|
||||
$this->out->elementEnd('dd');
|
||||
}
|
||||
|
@ -131,6 +133,7 @@ class UserProfile extends Widget
|
|||
if (Event::handle('StartProfilePageNickname', array($this->out, $this->profile))) {
|
||||
|
||||
$this->out->elementStart('dl', 'entity_nickname');
|
||||
// TRANS: DT for nick name in a profile.
|
||||
$this->out->element('dt', null, _('Nickname'));
|
||||
$this->out->elementStart('dd');
|
||||
$hasFN = ($this->profile->fullname) ? 'nickname url uid' : 'fn nickname url uid';
|
||||
|
@ -149,6 +152,7 @@ class UserProfile extends Widget
|
|||
if (Event::handle('StartProfilePageFullName', array($this->out, $this->profile))) {
|
||||
if ($this->profile->fullname) {
|
||||
$this->out->elementStart('dl', 'entity_fn');
|
||||
// TRANS: DT for full name in a profile.
|
||||
$this->out->element('dt', null, _('Full name'));
|
||||
$this->out->elementStart('dd');
|
||||
$this->out->element('span', 'fn', $this->profile->fullname);
|
||||
|
@ -164,6 +168,7 @@ class UserProfile extends Widget
|
|||
if (Event::handle('StartProfilePageLocation', array($this->out, $this->profile))) {
|
||||
if ($this->profile->location) {
|
||||
$this->out->elementStart('dl', 'entity_location');
|
||||
// TRANS: DT for location in a profile.
|
||||
$this->out->element('dt', null, _('Location'));
|
||||
$this->out->element('dd', 'label', $this->profile->location);
|
||||
$this->out->elementEnd('dl');
|
||||
|
@ -177,6 +182,7 @@ class UserProfile extends Widget
|
|||
if (Event::handle('StartProfilePageHomepage', array($this->out, $this->profile))) {
|
||||
if ($this->profile->homepage) {
|
||||
$this->out->elementStart('dl', 'entity_url');
|
||||
// TRANS: DT for URL in a profile.
|
||||
$this->out->element('dt', null, _('URL'));
|
||||
$this->out->elementStart('dd');
|
||||
$this->out->element('a', array('href' => $this->profile->homepage,
|
||||
|
@ -194,6 +200,7 @@ class UserProfile extends Widget
|
|||
if (Event::handle('StartProfilePageBio', array($this->out, $this->profile))) {
|
||||
if ($this->profile->bio) {
|
||||
$this->out->elementStart('dl', 'entity_note');
|
||||
// TRANS: DT for note in a profile.
|
||||
$this->out->element('dt', null, _('Note'));
|
||||
$this->out->element('dd', 'note', $this->profile->bio);
|
||||
$this->out->elementEnd('dl');
|
||||
|
@ -209,6 +216,7 @@ class UserProfile extends Widget
|
|||
|
||||
if (count($tags) > 0) {
|
||||
$this->out->elementStart('dl', 'entity_tags');
|
||||
// TRANS: DT for tags in a profile.
|
||||
$this->out->element('dt', null, _('Tags'));
|
||||
$this->out->elementStart('dd');
|
||||
$this->out->elementStart('ul', 'tags xoxo');
|
||||
|
@ -233,9 +241,11 @@ class UserProfile extends Widget
|
|||
{
|
||||
if ($this->profile->hasRole(Profile_role::DELETED)) {
|
||||
$this->out->elementStart('div', 'entity_actions');
|
||||
// TRANS: H2 for user actions in a profile.
|
||||
$this->out->element('h2', null, _('User actions'));
|
||||
$this->out->elementStart('ul');
|
||||
$this->out->elementStart('p', array('class' => 'profile_deleted'));
|
||||
// TRANS: Text shown in user profile of not yet compeltely deleted users.
|
||||
$this->out->text(_('User deletion in progress...'));
|
||||
$this->out->elementEnd('p');
|
||||
$this->out->elementEnd('ul');
|
||||
|
@ -247,6 +257,7 @@ class UserProfile extends Widget
|
|||
$cur = common_current_user();
|
||||
|
||||
$this->out->elementStart('div', 'entity_actions');
|
||||
// TRANS: H2 for entity actions in a profile.
|
||||
$this->out->element('h2', null, _('User actions'));
|
||||
$this->out->elementStart('ul');
|
||||
|
||||
|
@ -262,7 +273,9 @@ class UserProfile extends Widget
|
|||
if ($cur->id == $this->profile->id) { // your own page
|
||||
$this->out->elementStart('li', 'entity_edit');
|
||||
$this->out->element('a', array('href' => common_local_url('profilesettings'),
|
||||
// TRANS: Link title for link on user profile.
|
||||
'title' => _('Edit profile settings')),
|
||||
// TRANS: Link text for link on user profile.
|
||||
_('Edit'));
|
||||
$this->out->elementEnd('li');
|
||||
} else { // someone else's page
|
||||
|
@ -286,7 +299,9 @@ class UserProfile extends Widget
|
|||
|
||||
$this->out->elementStart('li', 'entity_send-a-message');
|
||||
$this->out->element('a', array('href' => common_local_url('newmessage', array('to' => $this->user->id)),
|
||||
// TRANS: Link title for link on user profile.
|
||||
'title' => _('Send a direct message to this user')),
|
||||
// TRANS: Link text for link on user profile.
|
||||
_('Message'));
|
||||
$this->out->elementEnd('li');
|
||||
|
||||
|
@ -328,6 +343,7 @@ class UserProfile extends Widget
|
|||
$cur->hasRight(Right::SILENCEUSER) ||
|
||||
$cur->hasRight(Right::DELETEUSER)) {
|
||||
$this->out->elementStart('li', 'entity_moderation');
|
||||
// TRANS: Label text on user profile to select a user role.
|
||||
$this->out->element('p', null, _('Moderate'));
|
||||
$this->out->elementStart('ul');
|
||||
if ($cur->hasRight(Right::SANDBOXUSER)) {
|
||||
|
@ -366,9 +382,12 @@ class UserProfile extends Widget
|
|||
|
||||
if ($isLocal && $cur->hasRight(Right::GRANTROLE)) {
|
||||
$this->out->elementStart('li', 'entity_role');
|
||||
// TRANS: Label text on user profile to select a user role.
|
||||
$this->out->element('p', null, _('User role'));
|
||||
$this->out->elementStart('ul');
|
||||
// TRANS: Role that can be set for a user profile.
|
||||
$this->roleButton('administrator', _m('role', 'Administrator'));
|
||||
// TRANS: Role that can be set for a user profile.
|
||||
$this->roleButton('moderator', _m('role', 'Moderator'));
|
||||
$this->out->elementEnd('ul');
|
||||
$this->out->elementEnd('li');
|
||||
|
@ -408,6 +427,7 @@ class UserProfile extends Widget
|
|||
array('nickname' => $this->profile->nickname));
|
||||
$this->out->element('a', array('href' => $url,
|
||||
'class' => 'entity_remote_subscribe'),
|
||||
// TRANS: Link text for link that will subscribe to a remote profile.
|
||||
_('Subscribe'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class XRD
|
||||
{
|
||||
const XML_NS = 'http://www.w3.org/2000/xmlns/';
|
||||
|
@ -61,12 +60,12 @@ class XRD
|
|||
|
||||
if (!$ok) {
|
||||
// TRANS: Exception.
|
||||
throw new Exception(_m('Invalid XML.'));
|
||||
throw new Exception(_('Invalid XML.'));
|
||||
}
|
||||
$xrd_element = $dom->getElementsByTagName('XRD')->item(0);
|
||||
if (!$xrd_element) {
|
||||
// TRANS: Exception.
|
||||
throw new Exception(_m('Invalid XML, missing XRD root.'));
|
||||
throw new Exception(_('Invalid XML, missing XRD root.'));
|
||||
}
|
||||
|
||||
// Check for host-meta host
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-12-16 15:08+0000\n"
|
||||
"POT-Creation-Date: 2011-01-29 21:45+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Translation of StatusNet - APC to Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца))
|
||||
# Expored from translatewiki.net
|
||||
# Exported from translatewiki.net
|
||||
#
|
||||
# Author: EugeneZelenko
|
||||
# --
|
||||
|
@ -9,14 +9,14 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: StatusNet - APC\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-01-14 10:29+0000\n"
|
||||
"PO-Revision-Date: 2011-01-14 10:32:43+0000\n"
|
||||
"POT-Creation-Date: 2011-01-29 21:45+0000\n"
|
||||
"PO-Revision-Date: 2011-01-29 21:49:16+0000\n"
|
||||
"Language-Team: Belarusian (Taraškievica orthography) <http://translatewiki."
|
||||
"net/wiki/Portal:be-tarask>\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-POT-Import-Date: 2011-01-10 18:25:57+0000\n"
|
||||
"X-Generator: MediaWiki 1.18alpha (r80246); Translate extension (2010-09-17)\n"
|
||||
"X-POT-Import-Date: 2011-01-14 13:18:28+0000\n"
|
||||
"X-Generator: MediaWiki 1.18alpha (r81195); Translate extension (2010-09-17)\n"
|
||||
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||
"X-Language-Code: be-tarask\n"
|
||||
"X-Message-Group: #out-statusnet-plugin-apc\n"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Translation of StatusNet - APC to Breton (Brezhoneg)
|
||||
# Expored from translatewiki.net
|
||||
# Exported from translatewiki.net
|
||||
#
|
||||
# Author: Fulup
|
||||
# --
|
||||
|
@ -9,13 +9,13 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: StatusNet - APC\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-12-16 15:08+0000\n"
|
||||
"PO-Revision-Date: 2010-12-16 15:11:29+0000\n"
|
||||
"POT-Creation-Date: 2011-01-29 21:45+0000\n"
|
||||
"PO-Revision-Date: 2011-01-29 21:49:16+0000\n"
|
||||
"Language-Team: Breton <http://translatewiki.net/wiki/Portal:br>\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-POT-Import-Date: 2010-11-29 19:38:22+0000\n"
|
||||
"X-Generator: MediaWiki 1.18alpha (r78478); Translate extension (2010-09-17)\n"
|
||||
"X-POT-Import-Date: 2011-01-14 13:18:28+0000\n"
|
||||
"X-Generator: MediaWiki 1.18alpha (r81195); Translate extension (2010-09-17)\n"
|
||||
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||
"X-Language-Code: br\n"
|
||||
"X-Message-Group: #out-statusnet-plugin-apc\n"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Translation of StatusNet - APC to Spanish (Español)
|
||||
# Expored from translatewiki.net
|
||||
# Exported from translatewiki.net
|
||||
#
|
||||
# Author: Translationista
|
||||
# --
|
||||
|
@ -9,13 +9,13 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: StatusNet - APC\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-12-16 15:08+0000\n"
|
||||
"PO-Revision-Date: 2010-12-16 15:11:29+0000\n"
|
||||
"POT-Creation-Date: 2011-01-29 21:45+0000\n"
|
||||
"PO-Revision-Date: 2011-01-29 21:49:16+0000\n"
|
||||
"Language-Team: Spanish <http://translatewiki.net/wiki/Portal:es>\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-POT-Import-Date: 2010-11-29 19:38:22+0000\n"
|
||||
"X-Generator: MediaWiki 1.18alpha (r78478); Translate extension (2010-09-17)\n"
|
||||
"X-POT-Import-Date: 2011-01-14 13:18:28+0000\n"
|
||||
"X-Generator: MediaWiki 1.18alpha (r81195); Translate extension (2010-09-17)\n"
|
||||
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||
"X-Language-Code: es\n"
|
||||
"X-Message-Group: #out-statusnet-plugin-apc\n"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Translation of StatusNet - APC to French (Français)
|
||||
# Expored from translatewiki.net
|
||||
# Exported from translatewiki.net
|
||||
#
|
||||
# Author: Verdy p
|
||||
# --
|
||||
|
@ -9,13 +9,13 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: StatusNet - APC\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-12-16 15:08+0000\n"
|
||||
"PO-Revision-Date: 2010-12-16 15:11:29+0000\n"
|
||||
"POT-Creation-Date: 2011-01-29 21:45+0000\n"
|
||||
"PO-Revision-Date: 2011-01-29 21:49:16+0000\n"
|
||||
"Language-Team: French <http://translatewiki.net/wiki/Portal:fr>\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-POT-Import-Date: 2010-11-29 19:38:22+0000\n"
|
||||
"X-Generator: MediaWiki 1.18alpha (r78478); Translate extension (2010-09-17)\n"
|
||||
"X-POT-Import-Date: 2011-01-14 13:18:28+0000\n"
|
||||
"X-Generator: MediaWiki 1.18alpha (r81195); Translate extension (2010-09-17)\n"
|
||||
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||
"X-Language-Code: fr\n"
|
||||
"X-Message-Group: #out-statusnet-plugin-apc\n"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Translation of StatusNet - APC to Galician (Galego)
|
||||
# Expored from translatewiki.net
|
||||
# Exported from translatewiki.net
|
||||
#
|
||||
# Author: Toliño
|
||||
# --
|
||||
|
@ -9,13 +9,13 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: StatusNet - APC\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-12-16 15:08+0000\n"
|
||||
"PO-Revision-Date: 2010-12-16 15:11:29+0000\n"
|
||||
"POT-Creation-Date: 2011-01-29 21:45+0000\n"
|
||||
"PO-Revision-Date: 2011-01-29 21:49:16+0000\n"
|
||||
"Language-Team: Galician <http://translatewiki.net/wiki/Portal:gl>\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-POT-Import-Date: 2010-11-29 19:38:22+0000\n"
|
||||
"X-Generator: MediaWiki 1.18alpha (r78478); Translate extension (2010-09-17)\n"
|
||||
"X-POT-Import-Date: 2011-01-14 13:18:28+0000\n"
|
||||
"X-Generator: MediaWiki 1.18alpha (r81195); Translate extension (2010-09-17)\n"
|
||||
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||
"X-Language-Code: gl\n"
|
||||
"X-Message-Group: #out-statusnet-plugin-apc\n"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Translation of StatusNet - APC to Hebrew (עברית)
|
||||
# Expored from translatewiki.net
|
||||
# Exported from translatewiki.net
|
||||
#
|
||||
# Author: YaronSh
|
||||
# --
|
||||
|
@ -9,13 +9,13 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: StatusNet - APC\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-12-16 15:08+0000\n"
|
||||
"PO-Revision-Date: 2010-12-16 15:11:29+0000\n"
|
||||
"POT-Creation-Date: 2011-01-29 21:45+0000\n"
|
||||
"PO-Revision-Date: 2011-01-29 21:49:16+0000\n"
|
||||
"Language-Team: Hebrew <http://translatewiki.net/wiki/Portal:he>\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-POT-Import-Date: 2010-11-29 19:38:22+0000\n"
|
||||
"X-Generator: MediaWiki 1.18alpha (r78478); Translate extension (2010-09-17)\n"
|
||||
"X-POT-Import-Date: 2011-01-14 13:18:28+0000\n"
|
||||
"X-Generator: MediaWiki 1.18alpha (r81195); Translate extension (2010-09-17)\n"
|
||||
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||
"X-Language-Code: he\n"
|
||||
"X-Message-Group: #out-statusnet-plugin-apc\n"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Translation of StatusNet - APC to Interlingua (Interlingua)
|
||||
# Expored from translatewiki.net
|
||||
# Exported from translatewiki.net
|
||||
#
|
||||
# Author: McDutchie
|
||||
# --
|
||||
|
@ -9,13 +9,13 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: StatusNet - APC\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-12-16 15:08+0000\n"
|
||||
"PO-Revision-Date: 2010-12-16 15:11:29+0000\n"
|
||||
"POT-Creation-Date: 2011-01-29 21:45+0000\n"
|
||||
"PO-Revision-Date: 2011-01-29 21:49:16+0000\n"
|
||||
"Language-Team: Interlingua <http://translatewiki.net/wiki/Portal:ia>\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-POT-Import-Date: 2010-11-29 19:38:22+0000\n"
|
||||
"X-Generator: MediaWiki 1.18alpha (r78478); Translate extension (2010-09-17)\n"
|
||||
"X-POT-Import-Date: 2011-01-14 13:18:28+0000\n"
|
||||
"X-Generator: MediaWiki 1.18alpha (r81195); Translate extension (2010-09-17)\n"
|
||||
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||
"X-Language-Code: ia\n"
|
||||
"X-Message-Group: #out-statusnet-plugin-apc\n"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user