* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class AccessadminpanelAction extends AdminPanelAction
{
/**
*
* @return string page title
*/
-
function title()
{
- // TRANS: Page title
+ // TRANS: Page title for Access admin panel that allows configuring site access.
return _('Access');
}
*
* @return string instructions
*/
-
function getInstructions()
{
- // TRANS: Page notice
+ // TRANS: Page notice.
return _('Site access settings');
}
*
* @return void
*/
-
function showForm()
{
$form = new AccessAdminPanelForm($this);
*
* @return void
*/
-
function saveSettings()
{
static $booleans = array('site' => array('private', 'inviteonly', 'closed'));
return;
}
-
}
class AccessAdminPanelForm extends AdminForm
*
* @return int ID of the form
*/
-
function id()
{
return 'form_site_admin_panel';
*
* @return string class of the form
*/
-
function formClass()
{
return 'form_settings';
*
* @return string URL of the action
*/
-
function action()
{
return common_local_url('accessadminpanel');
*
* @return void
*/
-
function formData()
{
$this->out->elementStart('fieldset', array('id' => 'settings_admin_access'));
$this->out->element('legend', null, _('Registration'));
$this->out->elementStart('ul', 'form_data');
$this->li();
- // TRANS: Checkbox instructions for admin setting "Private"
+ // TRANS: Checkbox instructions for admin setting "Private".
$instructions = _('Prohibit anonymous users (not logged in) from viewing site?');
// TRANS: Checkbox label for prohibiting anonymous users from viewing site.
$this->out->checkbox('private', _m('LABEL', 'Private'),
$this->unli();
$this->li();
- // TRANS: Checkbox instructions for admin setting "Invite only"
+ // TRANS: Checkbox instructions for admin setting "Invite only".
$instructions = _('Make registration invitation only.');
// TRANS: Checkbox label for configuring site as invite only.
$this->out->checkbox('inviteonly', _('Invite only'),
$this->unli();
$this->li();
- // TRANS: Checkbox instructions for admin setting "Closed" (no new registrations)
+ // TRANS: Checkbox instructions for admin setting "Closed" (no new registrations).
$instructions = _('Disable new registrations.');
// TRANS: Checkbox label for disabling new user registrations.
$this->out->checkbox('closed', _('Closed'),
*
* @return void
*/
-
function formActions()
{
- // TRANS: Title / tooltip for button to save access settings in site admin panel
+ // TRANS: Title for button to save access settings in site admin panel.
$title = _('Save access settings');
+ // TRANS: Tooltip for button to save access settings in site admin panel.
$this->out->submit('submit', _m('BUTTON', 'Save'), 'submit', null, $title);
}
-
}
}
if ($this->page > 1 && $this->notice->N == 0) {
- // TRANS: Server error when page not found (404)
+ // TRANS: Server error when page not found (404).
$this->serverError(_('No such page.'), $code = 404);
}
parent::handle($args);
if (!$this->user) {
+ // TRANS: Client error when user not found for an action.
$this->clientError(_('No such user.'));
return;
}
'nickname' =>
$this->user->nickname)
),
- // TRANS: %s is user nickname
+ // TRANS: %s is user nickname.
sprintf(_('Feed for friends of %s (RSS 1.0)'), $this->user->nickname)),
new Feed(Feed::RSS2,
common_local_url(
'id' => $this->user->nickname
)
),
- // TRANS: %s is user nickname
+ // TRANS: %s is user nickname.
sprintf(_('Feed for friends of %s (RSS 2.0)'), $this->user->nickname)),
new Feed(Feed::ATOM,
common_local_url(
'id' => $this->user->nickname
)
),
- // TRANS: %s is user nickname
+ // TRANS: %s is user nickname.
sprintf(_('Feed for friends of %s (Atom)'), $this->user->nickname))
);
}
function showEmptyListMessage()
{
- // TRANS: %s is user nickname
+ // TRANS: Empty list message. %s is a user nickname.
$message = sprintf(_('This is the timeline for %s and friends but no one has posted anything yet.'), $this->user->nickname) . ' ';
if (common_logged_in()) {
// TRANS: This message contains Markdown links. Keep "](" together.
$message .= _('Try subscribing to more people, [join a group](%%action.groups%%) or post something yourself.');
} else {
- // TRANS: %1$s is user nickname, %2$s is user nickname, %2$s is user nickname prefixed with "@"
+ // TRANS: %1$s is user nickname, %2$s is user nickname, %2$s is user nickname prefixed with "@".
// TRANS: This message contains Markdown links. Keep "](" together.
$message .= sprintf(_('You can try to [nudge %1$s](../%2$s) from their profile or [post something to them](%%%%action.newnotice%%%%?status_textarea=%3$s).'), $this->user->nickname, $this->user->nickname, '@' . $this->user->nickname);
}
{
$user = common_current_user();
if ($user && ($user->id == $this->user->id)) {
- // TRANS: H1 text
+ // TRANS: H1 text for page when viewing a list for self.
$this->element('h1', null, _("You and friends"));
} else {
- // TRANS: H1 text. %s is a user nickname
+ // TRANS: H1 text for page. %s is a user nickname.
$this->element('h1', null, sprintf(_('%s and friends'), $this->user->nickname));
}
}
<?php
-
/**
* RSS feed for user and friends timeline action class.
*
* @param array $args Web and URL arguments
*
* @return boolean false if user doesn't exist
- */
function prepare($args)
{
parent::prepare($args);
$this->user = User::staticGet('nickname', $nickname);
if (!$this->user) {
+ // TRANS: Client error when user not found for an rss related action.
$this->clientError(_('No such user.'));
return false;
} else {
* Get image.
*
* @return string user avatar URL or null
- */
+ */
function getImage()
{
$user = $this->user;
return $avatar ? $avatar->url : null;
}
}
-
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiAccountRateLimitStatusAction extends ApiBareAuthAction
{
-
/**
* Handle the request
*
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return boolean is read only action?
*/
-
function isReadOnly($args)
{
return true;
}
-
}
-
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
function prepare($args)
{
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
function prepare($args)
{
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
+ // TRANS: Client error displayed when trying to handle an unknown API method.
_('API method not found.'),
404,
$this->format
}
if (empty($this->user)) {
+ // TRANS: Client error when user not found updating a profile background image.
$this->clientError(_('No such user.'), 404, $this->format);
return;
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
{
-
var $profile_background_color = null;
var $profile_text_color = null;
var $profile_link_color = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
+ // TRANS: Client error displayed trying to execute an unknown API method updating profile colours.
_('API method not found.'),
404,
$this->format
$design = $this->user->getDesign();
if (!empty($design)) {
-
$original = clone($design);
try {
if ($result === false) {
common_log_db_error($design, 'UPDATE', __FILE__);
+ // TRANS: Client error displayed when a database error occurs updating profile colours.
$this->clientError(_('Could not update your design.'));
return;
}
-
} else {
-
$this->user->query('BEGIN');
// save new design
if (empty($id)) {
common_log_db_error($id, 'INSERT', __FILE__);
+ // TRANS: Client error displayed when a database error occurs inserting profile colours.
$this->clientError(_('Unable to save your design settings.'));
return;
}
if (empty($result)) {
common_log_db_error($original, 'UPDATE', __FILE__);
+ // TRANS: Client error displayed when a database error occurs updating profile colours.
$this->clientError(_('Unable to save your design settings.'));
$this->user->query('ROLLBACK');
return;
$profile = $this->user->getProfile();
if (empty($profile)) {
+ // TRANS: Client error displayed a user has no profile updating profile colours.
$this->clientError(_('User has no profile.'));
return;
}
*
* @return void
*/
-
function setColors($design)
{
$bgcolor = empty($this->profile_background_color) ?
return true;
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiAccountUpdateProfileImageAction extends ApiAuthAction
{
-
/**
* Take arguments for running
*
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
}
if (empty($this->user)) {
+ // TRANS: Client error displayed updating profile image without having a user object.
$this->clientError(_('No such user.'), 404, $this->format);
return;
}
$profile = $this->user->getProfile();
if (empty($profile)) {
+ // TRANS: Client error displayed if a user profile could not be found updating a profile image.
$this->clientError(_('User has no profile.'));
return;
}
$this->endDocument('json');
}
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiAccountVerifyCredentialsAction extends ApiAuthAction
{
-
/**
* Handle the request
*
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (!in_array($this->format, array('xml', 'json'))) {
+ // TRANS: Client error displayed trying to execute an unknown API method verifying user credentials.
$this->clientError(_('API method not found.'), $code = 404);
return;
}
* @param array $args other arguments
*
* @return boolean true
- *
- **/
-
+ */
function isReadOnly($args)
{
return true;
}
-
}
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
function prepare($args)
{
}
if (empty($this->user) || empty($this->other)) {
+ // TRANS: Client error when user not found for an API action to remove a block for a user.
$this->clientError(_('No such user.'), 404, $this->format);
return;
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiDirectMessageAction extends ApiAuthAction
{
var $messages = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
// Action was called by /api/direct_messages/sent.format
$this->title = sprintf(
- // TRANS: %s is a user nickname.
+ // TRANS: Title. %s is a user nickname.
_("Direct messages from %s"),
$this->user->nickname
);
$this->subtitle = sprintf(
- // TRANS: %s is a user nickname.
+ // TRANS: Subtitle. %s is a user nickname.
_("All the direct messages sent from %s"),
$this->user->nickname
);
$this->id = "tag:$taguribase:SentDirectMessages:" . $this->user->id;
} else {
$this->title = sprintf(
- // TRANS: %s is a user nickname.
+ // TRANS: Title. %s is a user nickname.
_("Direct messages to %s"),
$this->user->nickname
);
$this->subtitle = sprintf(
- // TRANS: %s is a user nickname.
+ // TRANS: Subtitle. %s is a user nickname.
_("All the direct messages sent to %s"),
$this->user->nickname
);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return void
*/
-
function showMessages()
{
switch($this->format) {
*
* @return array notices
*/
-
function getMessages()
{
$message = new Message();
*
* @return boolean true
*/
-
function isReadOnly($args)
{
return true;
*
* @return string datestamp of the latest notice in the stream
*/
-
function lastModified()
{
if (!empty($this->messages)) {
*
* @return void
*/
-
function showXmlDirectMessages()
{
$this->initDocument('xml');
*
* @return void
*/
-
function showJsonDirectMessages()
{
$this->initDocument('json');
*
* @return void
*/
-
function showRssDirectMessages()
{
$this->initDocument('rss');
*
* @return void
*/
-
function showAtomDirectMessages()
{
$this->initDocument('atom');
*
* @return string etag
*/
-
function etag()
{
if (!empty($this->messages)) {
return null;
}
-
}
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
function prepare($args)
{
$this->user = $this->auth_user;
if (empty($this->user)) {
+ // TRANS: Client error when user not found for an API direct message action.
$this->clientError(_('No such user.'), 404, $this->format);
return;
}
if (empty($this->content)) {
$this->clientError(
- // TRANS: Client error (406).
+ // TRANS: Client error displayed when no message text was submitted (406).
_('No message text!'),
406,
$this->format
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
function prepare($args)
{
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
+ // TRANS: Client error displayed when trying to handle an unknown API method.
_('API method not found.'),
404,
$this->format
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiFavoriteDestroyAction extends ApiAuthAction
{
-
var $notice = null;
/**
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
+ // TRANS: Client error displayed when trying to handle an unknown API method.
_('API method not found.'),
404,
$this->format
if (empty($this->notice)) {
$this->clientError(
+ // TRANS: Client error displayed when trying to remove a favourite with an invalid ID.
_('No status found with that ID.'),
404,
$this->format
if (!$fave->find(true)) {
$this->clientError(
+ // TRANS: Client error displayed when trying to remove a favourite that was not a favourite.
_('That status is not a favorite.'),
403,
$this->favorite
if (!$result) {
common_log_db_error($fave, 'DELETE', __FILE__);
$this->clientError(
+ // TRANS: Client error displayed when removing a favourite has failed.
_('Could not delete favorite.'),
404,
$this->format
$this->show_single_json_status($this->notice);
}
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiFriendshipsCreateAction extends ApiAuthAction
{
var $other = null;
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
+ // TRANS: Client error displayed when trying to handle an unknown API method.
_('API method not found.'),
404,
$this->format
if (empty($this->other)) {
$this->clientError(
+ // TRANS: Client error displayed when trying follow who's profile could not be found.
_('Could not follow user: profile not found.'),
403,
$this->format
if ($this->user->isSubscribed($this->other)) {
$errmsg = sprintf(
+ // TRANS: Client error displayed when trying to follow a user that's already being followed.
+ // TRANS: %s is the nickname of the user that is already being followed.
_('Could not follow user: %s is already on your list.'),
$this->other->nickname
);
$this->showProfile($this->other, $this->format);
$this->endDocument($this->format);
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiFriendshipsDestroyAction extends ApiAuthAction
{
var $other = null;
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
+ // TRANS: Client error displayed when trying to handle an unknown API method.
_('API method not found.'),
404,
$this->format
if (empty($this->other)) {
$this->clientError(
+ // TRANS: Client error displayed when trying to unfollow a user that cannot be found.
_('Could not unfollow user: User not found.'),
403,
$this->format
if ($this->user->id == $this->other->id) {
$this->clientError(
+ // TRANS: Client error displayed when trying to unfollow self.
_("You cannot unfollow yourself."),
403,
$this->format
$this->showProfile($this->other, $this->format);
$this->endDocument($this->format);
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiFriendshipsExistsAction extends ApiPrivateAuthAction
{
var $profile_a = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (empty($this->profile_a) || empty($this->profile_b)) {
$this->clientError(
+ // TRANS: Client error displayed when supplying invalid parameters to an API call checking if a friendship exists.
_('Two valid IDs or screen_names must be supplied.'),
400,
$this->format
*
* @return boolean is read only action?
*/
-
function isReadOnly($args)
{
return true;
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiFriendshipsShowAction extends ApiBareAuthAction
{
var $source = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return boolean true or false
*/
-
function requiresAuth()
{
if (common_config('site', 'private')) {
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (!in_array($this->format, array('xml', 'json'))) {
+ // TRANS: Client error displayed trying to execute an unknown API method showing friendship.
$this->clientError(_('API method not found.'), 404);
return;
}
if (empty($this->source)) {
$this->clientError(
+ // TRANS: Client error displayed when a source user could not be determined showing friendship.
_('Could not determine source user.'),
404
);
if (empty($this->target)) {
$this->clientError(
+ // TRANS: Client error displayed when a target user could not be determined showing friendship.
_('Could not find target user.'),
404
);
default:
break;
}
-
}
/**
{
return true;
}
-
}
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function validateParams()
{
$valid = Validate::string(
} elseif (User_group::descriptionTooLong($this->description)) {
$this->clientError(
sprintf(
- _('Description is too long (max %d chars).'),
+ // TRANS: Client error shown when providing too long a description during group creation.
+ // TRANS: %d is the maximum number of allowed characters.
+ _m('Description is too long (maximum %d character).',
+ 'Description is too long (maximum %d characters).',
+ User_group::maxDescription()),
User_group::maxDescription()
),
403,
!is_null($this->location)
&& mb_strlen($this->location) > 255) {
$this->clientError(
+ // TRANS: Client error shown when providing too long a location during group creation.
_('Location is too long (maximum 255 characters).'),
403,
$this->format
if (count($this->aliases) > common_config('group', 'maxaliases')) {
$this->clientError(
sprintf(
- _('Too many aliases! Maximum %d.'),
+ // TRANS: Client error shown when providing too many aliases during group creation.
+ // TRANS: %d is the maximum number of allowed aliases.
+ _m('Too many aliases! Maximum %d allowed.',
+ 'Too many aliases! Maximum %d allowed.',
+ common_config('group', 'maxaliases')),
common_config('group', 'maxaliases')
),
403,
if (!$valid) {
$this->clientError(
+ // TRANS: Client error shown when providing an invalid alias during group creation.
+ // TRANS: %s is the invalid alias.
sprintf(_('Invalid alias: "%s".'), $alias),
403,
$this->format
if ($this->groupNicknameExists($alias)) {
$this->clientError(
sprintf(
+ // TRANS: Client error displayed when trying to use an alias during group creation that is already in use.
+ // TRANS: %s is the alias that is already in use.
_('Alias "%s" already in use. Try another one.'),
$alias
),
if (strcmp($alias, $this->nickname) == 0) {
$this->clientError(
+ // TRANS: Client error displayed when trying to use an alias during group creation that is the same as the group's nickname.
_('Alias can\'t be the same as nickname.'),
403,
$this->format
}
}
- // Evarything looks OK
+ // Everything looks OK
return true;
}
*
* @return boolean true or false
*/
-
function groupNicknameExists($nickname)
{
$local = Local_group::staticGet('nickname', $nickname);
return false;
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiGroupIsMemberAction extends ApiBareAuthAction
{
var $group = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
function prepare($args)
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (empty($this->user)) {
+ // TRANS: Client error displayed when checking group membership for a non-existing user.
$this->clientError(_('No such user.'), 404, $this->format);
return;
}
if (empty($this->group)) {
+ // TRANS: Client error displayed when checking group membership for a non-existing group.
$this->clientError(_('Group not found.'), 404, $this->format);
return false;
}
break;
default:
$this->clientError(
+ // TRANS: Client error displayed trying to execute an unknown API method showing group membership.
_('API method not found.'),
400,
$this->format
*
* @return boolean is read only action?
*/
-
function isReadOnly($args)
{
return true;
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiGroupJoinAction extends ApiAuthAction
{
var $group = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
}
if (empty($this->user)) {
+ // TRANS: Client error displayed when trying to have a non-existing user join a group.
$this->clientError(_('No such user.'), 404, $this->format);
return;
}
if (empty($this->group)) {
+ // TRANS: Client error displayed when trying to join a group that does not exist.
$this->clientError(_('Group not found.'), 404, $this->format);
return false;
}
if ($this->user->isMember($this->group)) {
$this->clientError(
+ // TRANS: Server error displayed when trying to join a group the user is already a member of.
_('You are already a member of that group.'),
403,
$this->format
if (Group_block::isBlocked($this->group, $this->user->getProfile())) {
$this->clientError(
+ // TRANS: Server error displayed when trying to join a group the user is blocked from joining.
_('You have been blocked from that group by the admin.'),
403,
$this->format
common_log_db_error($member, 'INSERT', __FILE__);
$this->serverError(
sprintf(
+ // TRANS: Server error displayed when joining a group fails.
+ // TRANS: %1$s is a user nickname, $2$s is a group nickname.
_('Could not join user %1$s to group %2$s.'),
$this->user->nickname,
$this->group->nickname
break;
default:
$this->clientError(
+ // TRANS: Client error displayed trying to execute an unknown API method joining a group.
_('API method not found.'),
404,
$this->format
break;
}
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiGroupLeaveAction extends ApiAuthAction
{
var $group = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
}
if (empty($this->user)) {
+ // TRANS: Client error displayed when trying to have a non-existing user leave a group.
$this->clientError(_('No such user.'), 404, $this->format);
return;
}
if (empty($this->group)) {
+ // TRANS: Client error displayed when trying to leave a group that does not exist.
$this->clientError(_('Group not found.'), 404, $this->format);
return false;
}
$member->profile_id = $this->auth_user->id;
if (!$member->find(true)) {
+ // TRANS: Server error displayed when trying to leave a group the user is not a member of.
$this->serverError(_('You are not a member of this group.'));
return;
}
common_log_db_error($member, 'DELETE', __FILE__);
$this->serverError(
sprintf(
+ // TRANS: Server error displayed when leaving a group fails.
+ // TRANS: %1$s is a user nickname, $2$s is a group nickname.
_('Could not remove user %1$s from group %2$s.'),
$this->user->nickname,
$this->group->nickname
break;
default:
$this->clientError(
+ // TRANS: Client error displayed trying to execute an unknown API method leaving a group.
_('API method not found.'),
404,
$this->format
break;
}
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiGroupListAction extends ApiBareAuthAction
{
var $groups = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
$sitename = common_config('site', 'name');
- // TRANS: %s is a user name
+ // TRANS: Used as title in check for group membership. %s is a user name.
$title = sprintf(_("%s's groups"), $this->user->nickname);
$taguribase = TagURI::base();
$id = "tag:$taguribase:Groups";
);
$subtitle = sprintf(
- // TRANS: Meant to convey the user %2$s is a member of each of the groups listed on site %1$s
- _("%1\$s groups %2\$s is a member of."),
+ // TRANS: Used as subtitle in check for group membership. %1$s is a user name, %2$s is the site name.
+ _('%1$s groups %2$s is a member of.'),
$sitename,
$this->user->nickname
);
break;
default:
$this->clientError(
+ // TRANS: Client error displayed trying to execute an unknown API method checking group membership.
_('API method not found.'),
404,
$this->format
);
break;
}
-
}
/**
*
* @return array groups
*/
-
function getGroups()
{
$groups = array();
*
* @return boolean true
*/
-
function isReadOnly($args)
{
return true;
*
* @return string etag
*/
-
function etag()
{
if (!empty($this->groups) && (count($this->groups) > 0)) {
return null;
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiGroupListAllAction extends ApiPrivateAuthAction
{
var $groups = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
$sitename = common_config('site', 'name');
- // TRANS: Message is used as a title. %s is a site name.
+ // TRANS: Message is used as a title when listing the lastest 20 groups. %s is a site name.
$title = sprintf(_("%s groups"), $sitename);
$taguribase = TagURI::base();
$id = "tag:$taguribase:Groups";
$link = common_local_url('groups');
+ // TRANS: Message is used as a subtitle when listing the lastest 20 groups. %s is a site name.
$subtitle = sprintf(_("groups on %s"), $sitename);
switch($this->format) {
break;
default:
$this->clientError(
+ // TRANS: Client error displayed trying to execute an unknown API method listing the latest 20 groups.
_('API method not found.'),
404,
$this->format
);
break;
}
-
}
/**
*
* @return array groups
*/
-
function getGroups()
{
$qry = 'SELECT user_group.* '.
*
* @return boolean true
*/
-
function isReadOnly($args)
{
return true;
*
* @return string datestamp of the site's latest group
*/
-
function lastModified()
{
if (!empty($this->groups) && (count($this->groups) > 0)) {
*
* @return string etag
*/
-
function etag()
{
if (!empty($this->groups) && (count($this->groups) > 0)) {
return null;
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiGroupMembershipAction extends ApiPrivateAuthAction
{
var $group = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (empty($this->group)) {
+ // TRANS: Client error displayed trying to show group membership on a non-existing group.
$this->clientError(_('Group not found.'), 404, $this->format);
return false;
}
break;
default:
$this->clientError(
+ // TRANS: Client error displayed trying to execute an unknown API method showing group membership.
_('API method not found.'),
404,
$this->format
*
* @return array $profiles list of profiles
*/
-
function getProfiles()
{
$profiles = array();
*
* @return boolean true
*/
-
function isReadOnly($args)
{
return true;
*
* @return string datestamp of the lastest profile in the group
*/
-
function lastModified()
{
if (!empty($this->profiles) && (count($this->profiles) > 0)) {
*
* @return string etag
*/
-
function etag()
{
if (!empty($this->profiles) && (count($this->profiles) > 0)) {
return null;
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiGroupShowAction extends ApiPrivateAuthAction
{
var $group = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
common_redirect(common_local_url('ApiGroupShow', $args), 301);
} else {
$this->clientError(
+ // TRANS: Client error displayed when trying to show a group that could not be found.
_('Group not found.'),
404,
$this->format
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
$this->showSingleJsonGroup($this->group);
break;
default:
+ // TRANS: Client error displayed trying to execute an unknown API method showing a group.
$this->clientError(_('API method not found.'), 404, $this->format);
break;
}
*
* @return string datestamp of the latest notice in the stream
*/
-
function lastModified()
{
if (!empty($this->group)) {
*
* @return string etag
*/
-
function etag()
{
if (!empty($this->group)) {
*
* @return boolean is read only action?
*/
-
function isReadOnly($args)
{
return true;
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiHelpTestAction extends ApiPrivateAuthAction
{
-
/**
* Take arguments for running
*
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
$this->endDocument('json');
} else {
$this->clientError(
+ // TRANS: Client error displayed trying to execute an unknown API method testing API connectivity.
_('API method not found.'),
404,
$this->format
*
* @return boolean is read only action?
*/
-
function isReadOnly($args)
{
return true;
}
-
}
-
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiMediaUploadAction extends ApiAuthAction
{
/**
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (isset($upload)) {
$this->showResponse($upload);
} else {
+ // TRANS: Client error displayed when uploading a media file has failed.
$this->clientError(_('Upload failed.'));
return;
}
* Overrided clientError to show a more Twitpic-like error
*
* @param String $msg an error message
- *
*/
function clientError($msg)
{
$this->elementEnd('rsp');
$this->endDocument();
}
-
}
$app = $datastore->getAppByRequestToken($this->reqToken);
$atok = $server->fetch_access_token($req);
-
} catch (Exception $e) {
common_log(LOG_WARNING, 'API OAuthException - ' . $e->getMessage());
common_debug(var_export($req, true));
}
if (empty($atok)) {
-
// Token exchange failed -- log it
$msg = sprintf(
common_log(LOG_WARNING, $msg);
// TRANS: Client error given from the OAuth API when the request token or verifier is invalid.
$this->clientError(_("Invalid request token or verifier.", 400, 'text'));
-
} else {
common_log(
LOG_INFO,
*
* @param OAuthToken token the access token
*/
-
function showAccessToken($token)
{
header('Content-Type: application/x-www-form-urlencoded');
*
* @return boolean false
*/
-
function isReadOnly($args)
{
return false;
if (!$token || $token != common_session_token()) {
$this->showForm(
+ // TRANS: Form validation error in API OAuth authorisation because of an invalid session token.
_('There was a problem with your session token. Try again, please.'));
return;
}
assert(!empty($this->reqToken));
if ($this->arg('allow')) {
-
// mark the req token as authorized
try {
$this->store->authorize_token($this->oauthTokenParam);
// Otherwise, inform the user that the rt was authorized
$this->showAuthorized();
-
} else if ($this->arg('cancel')) {
-
common_log(
LOG_INFO,
sprintf(
$access = ($this->app->access_type & Oauth_application::$writeAccess) ?
'access and update' : 'access';
- // TRANS: User notification of external application requesting account access.
- // TRANS: %1$s is the application name requesting access, %2$s is the organisation behind the application,
- // TRANS: %3$s is the access type requested, %4$s is the StatusNet sitename.
if ($this->app->name == 'anonymous') {
- // Special message for the anonymous app and consumer
+ // Special message for the anonymous app and consumer.
+ // TRANS: User notification of external application requesting account access.
+ // TRANS: %3$s is the access type requested, %4$s is the StatusNet sitename.
$msg = _('An application would like the ability ' .
'to <strong>%3$s</strong> your %4$s account data. ' .
'You should only give access to your %4$s account ' .
'to third parties you trust.');
} else {
+ // TRANS: User notification of external application requesting account access.
+ // TRANS: %1$s is the application name requesting access, %2$s is the organisation behind the application,
+ // TRANS: %3$s is the access type requested, %4$s is the StatusNet sitename.
$msg = _('The application <strong>%1$s</strong> by ' .
'<strong>%2$s</strong> would like the ability ' .
'to <strong>%3$s</strong> your %4$s account data. ' .
);
$pin->showPage();
} else {
-
// NOTE: This would only happen if an application registered as
// a web application but sent in 'oob' for the oauth_callback
// parameter. Usually web apps will send in a callback and
$callback = $this->app->callback_url;
}
-
}
return $callback;
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiOauthPinAction extends InfoAction
{
function __construct($title, $message, $verifier, $desktopMode = false)
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiOauthRequestTokenAction extends ApiOauthAction
{
/**
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
/*
* Display temporary OAuth credentials
*/
-
function showRequestToken($token)
{
header('Content-Type: application/x-www-form-urlencoded');
*
* @return boolean true or false
*/
-
function verifyCallback($callback)
{
if ($callback == "oob") {
return Validate::uri($callback);
}
}
-
}
*
* @see ApiPrivateAuthAction
*/
-
class ApiSearchAtomAction extends ApiPrivateAuthAction
{
-
var $cnt;
var $query;
var $lang;
*
* @see Action::__construct
*/
-
function __construct($output='php://output', $indent=null)
{
parent::__construct($output, $indent);
*
* @return boolean true
*/
-
function isReadonly()
{
return true;
* @param array $args Arguments from $_REQUEST
*
* @return boolean success
- *
*/
-
function prepare($args)
{
common_debug("in apisearchatom prepare()");
parent::prepare($args);
-
$this->query = $this->trimmed('q');
$this->lang = $this->trimmed('lang');
$this->rpp = $this->trimmed('rpp');
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return array an array of Notice objects sorted in reverse chron
*/
-
function getNotices()
{
// TODO: Support search operators like from: and to:, boolean, etc.
if ($this->cnt > 0) {
while ($notice->fetch()) {
-
++$cnt;
if (!$this->max_id) {
*
* @return void
*/
-
function showAtom()
{
$notices = $this->getNotices();
$this->showFeed();
foreach ($notices as $n) {
-
$profile = $n->getProfile();
// Don't show notices from deleted users
*
* @return void
*/
-
function showFeed()
{
// TODO: A9 OpenSearch stuff like search.twitter.com?
'rel' => 'self',
'href' => $self_uri));
+ // @todo Needs i18n?
$this->element('title', null, "$this->query - $sitename Search");
$this->element('updated', null, common_date_iso8601('now'));
'rel' => 'previous',
'href' => $previous_uri));
}
-
}
/**
*
* @return void
*/
-
function showEntry($notice)
{
$server = common_config('site', 'server');
if ($ns) {
if (!empty($ns->name) && !empty($ns->url)) {
$source = '<a href="'
- . htmlspecialchars($ns->url)
- . '" rel="nofollow">'
- . htmlspecialchars($ns->name)
- . '</a>';
+ . htmlspecialchars($ns->url)
+ . '" rel="nofollow">'
+ . htmlspecialchars($ns->name)
+ . '</a>';
} else {
$source = $ns->code;
}
$name = $profile->nickname;
if ($profile->fullname) {
+ // @todo Needs proper i18n?
$name .= ' (' . $profile->fullname . ')';
}
*
* @return void
*/
-
function initAtom()
{
header('Content-Type: application/atom+xml; charset=utf-8');
*
* @return void
*/
-
function endAtom()
{
$this->elementEnd('feed');
}
-
}
* @link http://status.net/
* @see ApiAction
*/
-
class ApiSearchJSONAction extends ApiPrivateAuthAction
{
var $query;
*
* @return boolean true if nothing goes wrong
*/
-
function prepare($args)
{
common_debug("apisearchjson prepare()");
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return void
*/
-
function showResults()
{
-
// TODO: Support search operators like from: and to:, boolean, etc.
$notice = new Notice();
*
* @return boolean true
*/
-
function isReadOnly($args)
{
return true;
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiStatusesDestroyAction extends ApiAuthAction
{
var $status = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
+ // TRANS: Client error displayed trying to execute an unknown API method deleting a status.
_('API method not found.'),
404
);
if (!in_array($_SERVER['REQUEST_METHOD'], array('POST', 'DELETE'))) {
$this->clientError(
+ // TRANS: Client error displayed trying to delete a status not using POST or DELETE.
+ // TRANS: POST and DELETE should not be translated.
_('This method requires a POST or DELETE.'),
400,
$this->format
if (empty($this->notice)) {
$this->clientError(
+ // TRANS: Client error displayed trying to delete a status with an invalid ID.
_('No status found with that ID.'),
404, $this->format
);
$this->showNotice();
} else {
$this->clientError(
+ // TRANS: Client error displayed trying to delete a status of another user.
_('You may not delete another user\'s status.'),
403,
$this->format
*
* @return void
*/
-
function showNotice()
{
if (!empty($this->notice)) {
}
}
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiStatusesRetweetAction extends ApiAuthAction
{
var $original = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
$this->original = Notice::staticGet('id', $id);
if (empty($this->original)) {
+ // TRANS: Client error displayed trying to repeat a non-existing notice through the API.
$this->clientError(_('No such notice.'),
400, $this->format);
return false;
$this->user = $this->auth_user;
if ($this->user->id == $this->original->profile_id) {
+ // TRANS: Client error displayed trying to repeat an own notice through the API.
$this->clientError(_('Cannot repeat your own notice.'),
400, $this->format);
return false;
$profile = $this->user->getProfile();
if ($profile->hasRepeated($id)) {
+ // TRANS: Client error displayed trying to re-repeat a notice through the API.
$this->clientError(_('Already repeated that notice.'),
400, $this->format);
return false;
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
$repeat = $this->original->repeat($this->user->id, $this->source);
-
-
$this->showNotice($repeat);
}
*
* @return void
*/
-
function showNotice($notice)
{
if (!empty($notice)) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiStatusesRetweetsAction extends ApiAuthAction
{
const MAXCOUNT = 100;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
$this->original = Notice::staticGet('id', $id);
if (empty($this->original)) {
+ // TRANS: Client error displayed trying to display redents of a non-exiting notice.
$this->clientError(_('No such notice.'),
400, $this->format);
return false;
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
$this->showJsonTimeline($strm);
break;
default:
+ // TRANS: Client error displayed when trying to handle an unknown API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiStatusesShowAction extends ApiPrivateAuthAction
{
-
var $notice_id = null;
var $notice = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (!in_array($this->format, array('xml', 'json'))) {
+ // TRANS: Client error displayed when trying to handle an unknown API method.
$this->clientError(_('API method not found.'), $code = 404);
return;
}
*
* @return void
*/
-
function showNotice()
{
if (!empty($this->notice)) {
$this->show_single_json_status($this->notice);
}
} else {
-
// XXX: Twitter just sets a 404 header and doens't bother
// to return an err msg
if (!empty($deleted)) {
$this->clientError(
+ // TRANS: Client error displayed requesting a deleted status.
_('Status deleted.'),
410,
$this->format
);
} else {
$this->clientError(
+ // TRANS: Client error displayed requesting a status with an invalid ID.
_('No status with that ID found.'),
404,
$this->format
*
* @return boolean true
*/
-
function isReadOnly($args)
{
return true;
*
* @return string datestamp of the latest notice in the stream
*/
-
function lastModified()
{
if (!empty($this->notice)) {
*
* @return string etag
*/
-
function etag()
{
if (!empty($this->notice)) {
return null;
}
-
}
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
function prepare($args)
{
}
if (empty($this->auth_user)) {
+ // TRANS: Client error displayed when updating a status for a non-existing user.
$this->clientError(_('No such user.'), 404, $this->format);
return;
}
$status_shortened = common_shorten_links($this->status);
if (Notice::contentTooLong($status_shortened)) {
-
// Note: Twitter truncates anything over 140, flags the status
// as "truncated."
if (Notice::contentTooLong($status_shortened)) {
$upload->delete();
+ // TRANS: Client error displayed exceeding the maximum notice length.
+ // TRANS: %d is the maximum lenth for a notice.
$msg = _m('Maximum notice size is %d character, including attachment URL.',
'Maximum notice size is %d characters, including attachment URL.',
Notice::maxContent());
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiStatusnetConfigAction extends ApiAction
{
var $keys = array(
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
break;
default:
$this->clientError(
+ // TRANS: Client error displayed when trying to handle an unknown API method.
_('API method not found.'),
404,
$this->format
*
* @return boolean is read only action?
*/
-
function isReadOnly($args)
{
return true;
}
-
}
-
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiStatusnetVersionAction extends ApiPrivateAuthAction
{
/**
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
break;
default:
$this->clientError(
+ // TRANS: Client error displayed when trying to handle an unknown API method.
_('API method not found.'),
404,
$this->format
*
* @return boolean is read only action?
*/
-
function isReadOnly($args)
{
return true;
}
-
}
-
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiSubscriptionsAction extends ApiBareAuthAction
{
var $profiles = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
$this->user = $this->getTargetUser($this->arg('id'));
if (empty($this->user)) {
+ // TRANS: Client error displayed when requesting a list of followers for a non-existing user.
$this->clientError(_('No such user.'), 404, $this->format);
return false;
}
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (!in_array($this->format, array('xml', 'json'))) {
+ // TRANS: Client error displayed when trying to handle an unknown API method.
$this->clientError(_('API method not found.'), $code = 404);
return;
}
*
* @return array Profiles
*/
-
function getProfiles()
{
}
*
* @return boolean true
*/
-
function isReadOnly($args)
{
return true;
*
* @return string datestamp of the latest profile in the stream
*/
-
function lastModified()
{
if (!empty($this->profiles) && (count($this->profiles) > 0)) {
*
* @return string etag
*/
-
function etag()
{
if (!empty($this->profiles) && (count($this->profiles) > 0)) {
common_user_cache_hash($this->auth_user),
common_language(),
$this->user->id,
+ // Caching tags.
isset($this->ids_only) ? 'IDs' : 'Profiles',
strtotime($this->profiles[0]->created),
strtotime($this->profiles[$last]->created))
*
* @return void
*/
-
function showProfiles($include_statuses = true)
{
switch ($this->format) {
print json_encode($arrays);
break;
default:
+ // TRANS: Client error displayed when requesting profiles of followers in an unsupported format.
$this->clientError(_('Unsupported format.'));
break;
}
*
* @return void
*/
-
function showIds()
{
switch ($this->format) {
print json_encode($ids);
break;
default:
+ // TRANS: Client error displayed when requesting IDs of followers in an unsupported format.
$this->clientError(_('Unsupported format.'));
break;
}
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiTimelineFavoritesAction extends ApiBareAuthAction
{
var $notices = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
$this->user = $this->getTargetUser($this->arg('id'));
if (empty($this->user)) {
+ // TRANS: Client error displayed when requesting most recent favourite notices by a user for a non-existing user.
$this->clientError(_('No such user.'), 404, $this->format);
return;
}
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return void
*/
-
function showTimeline()
{
$profile = $this->user->getProfile();
$sitename = common_config('site', 'name');
$title = sprintf(
+ // TRANS: Title for timeline of most recent favourite notices by a user.
+ // TRANS: %1$s is the StatusNet sitename, %2$s is a user nickname.
_('%1$s / Favorites from %2$s'),
$sitename,
$this->user->nickname
$id = "tag:$taguribase:Favorites:" . $this->user->id;
$subtitle = sprintf(
- _('%1$s updates favorited by %2$s / %2$s.'),
+ // TRANS: Subtitle for timeline of most recent favourite notices by a user.
+ // TRANS: %1$s is the StatusNet sitename, %2$s is a user's full name,
+ // TRANS: %3$s is a user nickname.
+ _('%1$s updates favorited by %2$s / %3$s.'),
$sitename,
$profile->getBestName(),
$this->user->nickname
);
break;
case 'atom':
-
header('Content-Type: application/atom+xml; charset=utf-8');
$atom = new AtomNoticeFeed($this->auth_user);
$atom->addEntryFromNotices($this->notices);
$this->raw($atom->getString());
-
break;
case 'json':
$this->showJsonTimeline($this->notices);
break;
default:
+ // TRANS: Client error displayed when trying to handle an unknown API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
*
* @return array notices
*/
-
function getNotices()
{
$notices = array();
*
* @return boolean true
*/
-
function isReadOnly($args)
{
return true;
*
* @return string datestamp of the latest notice in the stream
*/
-
function lastModified()
{
if (!empty($this->notices) && (count($this->notices) > 0)) {
*
* @return string etag
*/
-
function etag()
{
if (!empty($this->notices) && (count($this->notices) > 0)) {
return null;
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiTimelineFriendsAction extends ApiBareAuthAction
{
var $notices = null;
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
$this->user = $this->getTargetUser($this->arg('id'));
if (empty($this->user)) {
+ // TRANS: Client error displayed when requesting dents of a user and friends for a user that does not exist.
$this->clientError(_('No such user.'), 404, $this->format);
return;
}
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return void
*/
-
function showTimeline()
{
$profile = $this->user->getProfile();
);
break;
case 'atom':
-
header('Content-Type: application/atom+xml; charset=utf-8');
$atom = new AtomNoticeFeed($this->auth_user);
$this->showJsonTimeline($this->notices);
break;
default:
+ // TRANS: Client error displayed when trying to handle an unknown API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
*
* @return array notices
*/
-
function getNotices()
{
$notices = array();
*
* @return boolean true
*/
-
function isReadOnly($args)
{
return true;
*
* @return string datestamp of the latest notice in the stream
*/
-
function lastModified()
{
if (!empty($this->notices) && (count($this->notices) > 0)) {
*
* @return string etag
*/
-
function etag()
{
if (!empty($this->notices) && (count($this->notices) > 0)) {
-
$last = count($this->notices) - 1;
return '"' . implode(
return null;
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiTimelineGroupAction extends ApiPrivateAuthAction
{
-
var $group = null;
var $notices = null;
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (empty($this->group)) {
+ // TRANS: Client error displayed requesting most recent notices to a group for a non-existing group.
$this->clientError(_('Group not found.'), 404, $this->format);
return false;
}
*
* @return void
*/
-
function showTimeline()
{
// We'll pull common formatting out of this for other formats
);
break;
case 'atom':
-
header('Content-Type: application/atom+xml; charset=utf-8');
try {
$this->raw($atom->getString());
} catch (Atom10FeedException $e) {
$this->serverError(
- 'Could not generate feed for group - ' . $e->getMessage(),
+ // TRANS: Server error displayed when generating an Atom feed fails.
+ // TRANS: %s is the error.
+ sprintf(_('Could not generate feed for group - %s'),$e->getMessage()),
400,
$this->format
);
return;
}
-
break;
case 'json':
$this->showJsonTimeline($this->notices);
break;
default:
$this->clientError(
+ // TRANS: Client error displayed when trying to handle an unknown API method.
_('API method not found.'),
404,
$this->format
*
* @return array notices
*/
-
function getNotices()
{
$notices = array();
*
* @return boolean true
*/
-
function isReadOnly($args)
{
return true;
*
* @return string datestamp of the latest notice in the stream
*/
-
function lastModified()
{
if (!empty($this->notices) && (count($this->notices) > 0)) {
*
* @return string etag
*/
-
function etag()
{
if (!empty($this->notices) && (count($this->notices) > 0)) {
return null;
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiTimelineHomeAction extends ApiBareAuthAction
{
var $notices = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
$this->user = $this->getTargetUser($this->arg('id'));
if (empty($this->user)) {
+ // TRANS: Client error displayed when requesting most recent dents by user and friends for a non-existing user.
$this->clientError(_('No such user.'), 404, $this->format);
return;
}
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return void
*/
-
function showTimeline()
{
$profile = $this->user->getProfile();
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
$sitename = common_config('site', 'name');
+ // TRANS: Timeline title for user and friends. %s is a user nickname.
$title = sprintf(_("%s and friends"), $this->user->nickname);
$taguribase = TagURI::base();
$id = "tag:$taguribase:HomeTimeline:" . $this->user->id;
$this->showJsonTimeline($this->notices);
break;
default:
+ // TRANS: Client error displayed when trying to handle an unknown API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
*
* @return array notices
*/
-
function getNotices()
{
$notices = array();
*
* @return boolean true
*/
-
function isReadOnly($args)
{
return true;
*
* @return string datestamp of the latest notice in the stream
*/
-
function lastModified()
{
if (!empty($this->notices) && (count($this->notices) > 0)) {
*
* @return string etag
*/
-
function etag()
{
if (!empty($this->notices) && (count($this->notices) > 0)) {
return null;
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiTimelineMentionsAction extends ApiBareAuthAction
{
-
var $notices = null;
/**
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
$this->user = $this->getTargetUser($this->arg('id'));
if (empty($this->user)) {
+ // TRANS: Client error displayed when requesting most recent mentions for a non-existing user.
$this->clientError(_('No such user.'), 404, $this->format);
return;
}
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return void
*/
-
function showTimeline()
{
$profile = $this->user->getProfile();
$sitename = common_config('site', 'name');
$title = sprintf(
+ // TRANS: Title for timeline of most recent mentions of a user.
+ // TRANS: %1$s is the StatusNet sitename, %2$s is a user nickname.
_('%1$s / Updates mentioning %2$s'),
$sitename, $this->user->nickname
);
$self = $this->getSelfUri();
$subtitle = sprintf(
+ // TRANS: Subtitle for timeline of most recent mentions of a user.
+ // TRANS: %1$s is the StatusNet sitename, %2$s is a user nickname,
+ // TRANS: %3$s is a user's full name.
_('%1$s updates that reply to updates from %2$s / %3$s.'),
$sitename, $this->user->nickname, $profile->getBestName()
);
);
break;
case 'atom':
-
header('Content-Type: application/atom+xml; charset=utf-8');
$atom = new AtomNoticeFeed($this->auth_user);
$this->showJsonTimeline($this->notices);
break;
default:
+ // TRANS: Client error displayed when trying to handle an unknown API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
*
* @return array notices
*/
-
function getNotices()
{
$notices = array();
*
* @return boolean true
*/
-
function isReadOnly($args)
{
return true;
*
* @return string datestamp of the latest notice in the stream
*/
-
function lastModified()
{
if (!empty($this->notices) && (count($this->notices) > 0)) {
*
* @return string etag
*/
-
function etag()
{
if (!empty($this->notices) && (count($this->notices) > 0)) {
return null;
}
-
}
</statuses>
@endverbatim
*/
-
class ApiTimelinePublicAction extends ApiPrivateAuthAction
{
-
var $notices = null;
/**
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return void
*/
-
function showTimeline()
{
$sitename = common_config('site', 'name');
$sitelogo = (common_config('site', 'logo')) ? common_config('site', 'logo') : Theme::path('logo.png');
+ // TRANS: Title for site timeline. %s is the StatusNet sitename.
$title = sprintf(_("%s public timeline"), $sitename);
$taguribase = TagURI::base();
$id = "tag:$taguribase:PublicTimeline";
$link = common_local_url('public');
$self = $this->getSelfUri();
+ // TRANS: Subtitle for site timeline. %s is the StatusNet sitename.
$subtitle = sprintf(_("%s updates from everyone!"), $sitename);
switch($this->format) {
$this->showJsonTimeline($this->notices);
break;
default:
+ // TRANS: Client error displayed when trying to handle an unknown API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
*
* @return array notices
*/
-
function getNotices()
{
$notices = array();
*
* @return boolean true
*/
-
function isReadOnly($args)
{
return true;
*
* @return string datestamp of the latest notice in the stream
*/
-
function lastModified()
{
if (!empty($this->notices) && (count($this->notices) > 0)) {
*
* @return string etag
*/
-
function etag()
{
if (!empty($this->notices) && (count($this->notices) > 0)) {
return null;
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiTimelineRetweetedByMeAction extends ApiAuthAction
{
const DEFAULTCOUNT = 20;
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
- $this->serverError('Unimplemented.', 503);
+ // TRANS: Server error displayed calling unimplemented API method for 'retweeted by me'.
+ $this->serverError(_('Unimplemented.'), 503);
return false;
}
*
* @return boolean is read only action?
*/
-
function isReadOnly($args)
{
return true;
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiTimelineRetweetedToMeAction extends ApiAuthAction
{
const DEFAULTCOUNT = 20;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
case 'atom':
$profile = $this->auth_user->getProfile();
+ // TRANS: Title for Atom feed "repeated to me". %s is the user nickname.
$title = sprintf(_("Repeated to %s"), $this->auth_user->nickname);
$taguribase = TagURI::base();
$id = "tag:$taguribase:RepeatedToMe:" . $this->auth_user->id;
$this->showAtomTimeline($strm, $title, $id, $link);
break;
-
default:
+ // TRANS: Client error displayed when trying to handle an unknown API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
*
* @return boolean is read only action?
*/
-
function isReadOnly($args)
{
return true;
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiTimelineRetweetsOfMeAction extends ApiAuthAction
{
const DEFAULTCOUNT = 20;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
case 'atom':
$profile = $this->auth_user->getProfile();
+ // TRANS: Title of list of repeated notices of the logged in user.
+ // TRANS: %s is the nickname of the logged in user.
$title = sprintf(_("Repeats of %s"), $this->auth_user->nickname);
$taguribase = TagURI::base();
$id = "tag:$taguribase:RepeatsOfMe:" . $this->auth_user->id;
$this->raw($atom->getString());
break;
-
default:
+ // TRANS: Client error displayed when trying to handle an unknown API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
*
* @return boolean is read only action?
*/
-
function isReadOnly($args)
{
return true;
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiTimelineTagAction extends ApiPrivateAuthAction
{
-
var $notices = null;
/**
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return void
*/
-
function showTimeline()
{
$sitename = common_config('site', 'name');
$sitelogo = (common_config('site', 'logo')) ? common_config('site', 'logo') : Theme::path('logo.png');
+ // TRANS: Title for timeline with lastest notices with a given tag.
+ // TRANS: %s is the tag.
$title = sprintf(_("Notices tagged with %s"), $this->tag);
$subtitle = sprintf(
+ // TRANS: Subtitle for timeline with lastest notices with a given tag.
+ // TRANS: %1$s is the tag, $2$s is the StatusNet sitename.
_('Updates tagged with %1$s on %2$s!'),
$this->tag,
$sitename
);
break;
case 'atom':
-
header('Content-Type: application/atom+xml; charset=utf-8');
$atom = new AtomNoticeFeed($this->auth_user);
$this->showJsonTimeline($this->notices);
break;
default:
+ // TRANS: Client error displayed when trying to handle an unknown API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
*
* @return array notices
*/
-
function getNotices()
{
$notices = array();
*
* @return boolean true
*/
-
function isReadOnly($args)
{
return true;
*
* @return string datestamp of the latest notice in the stream
*/
-
function lastModified()
{
if (!empty($this->notices) && (count($this->notices) > 0)) {
*
* @return string etag
*/
-
function etag()
{
if (!empty($this->notices) && (count($this->notices) > 0)) {
return null;
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiTimelineUserAction extends ApiBareAuthAction
{
-
var $notices = null;
/**
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
$this->user = $this->getTargetUser($this->arg('id'));
if (empty($this->user)) {
+ // TRANS: Client error displayed requesting most recent notices for a non-existing user.
$this->clientError(_('No such user.'), 404, $this->format);
return;
}
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return void
*/
-
function showTimeline()
{
$profile = $this->user->getProfile();
);
break;
case 'atom':
-
header('Content-Type: application/atom+xml; charset=utf-8');
$atom->setId($self);
$this->showJsonTimeline($this->notices);
break;
default:
+ // TRANS: Client error displayed when trying to handle an unknown API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
-
}
/**
*
* @return array notices
*/
-
function getNotices()
{
$notices = array();
*
* @return boolean true
*/
-
function isReadOnly($args)
{
return true;
*
* @return string datestamp of the latest notice in the stream
*/
-
function lastModified()
{
if (!empty($this->notices) && (count($this->notices) > 0)) {
*
* @return string etag
*/
-
function etag()
{
if (!empty($this->notices) && (count($this->notices) > 0)) {
-
$last = count($this->notices) - 1;
return '"' . implode(
return null;
}
-
}
*
* @see ApiAction
*/
-
class ApiTrendsAction extends ApiPrivateAuthAction
{
-
var $callback;
/**
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*/
function showTrends()
{
+ // TRANS: Server error for unfinished API method showTrends.
$this->serverError(_('API method under construction.'), 501);
}
-
-}
\ No newline at end of file
+}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiUserFollowersAction extends ApiSubscriptionsAction
{
/**
*
* @return array Profiles
*/
-
function getProfiles()
{
$offset = ($this->page - 1) * $this->count;
return $profiles;
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiUserFriendsAction extends ApiSubscriptionsAction
{
/**
*
* @return array Profiles
*/
-
function getProfiles()
{
$offset = ($this->page - 1) * $this->count;
return $profiles;
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiUserShowAction extends ApiPrivateAuthAction
{
/**
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (empty($this->user)) {
- $this->clientError(_('Not found.'), 404, $this->format);
+ // TRANS: Client error displayed when requesting user information for a non-existing user.
+ $this->clientError(_('User not found.'), 404, $this->format);
return;
}
if (!in_array($this->format, array('xml', 'json'))) {
+ // TRANS: Client error displayed when trying to handle an unknown API method.
$this->clientError(_('API method not found.'), $code = 404);
return;
}
$profile = $this->user->getProfile();
if (empty($profile)) {
+ // TRANS: Client error displayed when requesting user information for a user without a profile.
$this->clientError(_('User has no profile.'));
return;
}
$this->showJsonObjects($twitter_user);
$this->endDocument('json');
}
-
}
/**
*
* @return boolean is read only action?
*/
-
function isReadOnly($args)
{
return true;
}
-
}
$this->showForm(_('Full name is too long (maximum 255 characters).'));
return;
} else if (User_group::descriptionTooLong($description)) {
- $this->showForm(sprintf(_('description is too long (max %d chars).'), User_group::maxDescription()));
+ // TRANS: Form validation error creating a new group because the description is too long.
+ // TRANS: %d is the maximum number of allowed characters.
+ $this->showForm(sprintf(_m('Description is too long (maximum %d character).',
+ 'Description is too long (maximum %d characters).',
+ User_group::maxDescription(),
+ User_group::maxDescription()));
return;
} else if (!is_null($location) && mb_strlen($location) > 255) {
$this->showForm(_('Location is too long (maximum 255 characters).'));
}
if (count($aliases) > common_config('group', 'maxaliases')) {
- $this->showForm(sprintf(_('Too many aliases! Maximum %d.'),
+ // TRANS: Client error shown when providing too many aliases during group creation.
+ // TRANS: %d is the maximum number of allowed aliases.
+ $this->showForm(sprintf(_m('Too many aliases! Maximum %d allowed.',
+ 'Too many aliases! Maximum %d allowed.',
+ common_config('group', 'maxaliases')),
common_config('group', 'maxaliases')));
return;
}
if (!empty($homepage)) {
if (!$this->_checkUrl($homepage)) {
- $msg = sprintf(_m("You may not register with homepage '%s'."),
+ // TRANS: Validation failure for URL. %s is the URL.
+ $msg = sprintf(_m("You may not register with homepage \"%s\"."),
$homepage);
throw new ClientException($msg);
}
if (!empty($nickname)) {
if (!$this->_checkNickname($nickname)) {
- $msg = sprintf(_m("You may not register with nickname '%s'."),
+ // TRANS: Validation failure for nickname. %s is the nickname.
+ $msg = sprintf(_m("You may not register with nickname \"%s\"."),
$nickname);
throw new ClientException($msg);
}
if (!empty($homepage)) {
if (!$this->_checkUrl($homepage)) {
- $msg = sprintf(_m("You may not use homepage '%s'."),
+ // TRANS: Validation failure for URL. %s is the URL.
+ $msg = sprintf(_m("You may not use homepage \"%s\"."),
$homepage);
throw new ClientException($msg);
}
if (!empty($nickname)) {
if (!$this->_checkNickname($nickname)) {
- $msg = sprintf(_m("You may not use nickname '%s'."),
+ // TRANS: Validation failure for nickname. %s is the nickname.
+ $msg = sprintf(_m("You may not use nickname \"%s\"."),
$nickname);
throw new ClientException($msg);
}
$url = htmlspecialchars_decode($url);
if (!$this->_checkUrl($url)) {
+ // TRANS: Validation failure for URL. %s is the URL.
$msg = sprintf(_m("You may not use URL \"%s\" in notices."),
$url);
throw new ClientException($msg);
$action_name = $nav->action->trimmed('action');
$nav->out->menuItem(common_local_url('blacklistadminpanel'),
- _m('Blacklist'),
- _m('Blacklist configuration'),
+ // TRANS: Menu item in admin panel.
+ _m('MENU','Blacklist'),
+ // TRANS: Tooltip for menu item in admin panel.
+ _m('TOOLTIP','Blacklist configuration'),
$action_name == 'blacklistadminpanel',
'nav_blacklist_admin_panel');
}
$action->elementStart('li');
$this->checkboxAndText($action,
'blacklistnickname',
+ // TRANS: Checkbox with text label in the delete user form.
_m('Add this nickname pattern to blacklist'),
'blacklistnicknamepattern',
$this->patternizeNickname($user->nickname));
$action->elementStart('li');
$this->checkboxAndText($action,
'blacklisthomepage',
+ // TRANS: Checkbox with text label in the delete user form.
_m('Add this homepage pattern to blacklist'),
'blacklisthomepagepattern',
$this->patternizeHomepage($profile->homepage));
if (!empty($homepage)) {
if (!$this->_checkUrl($homepage)) {
- $msg = sprintf(_m("Users from '%s' blocked."),
+ // TRANS: Exception thrown trying to post a notice while having set a blocked homepage URL. %s is the blocked URL.
+ $msg = sprintf(_m("Users from \"%s\" blocked."),
$homepage);
throw new ClientException($msg);
}
if (!empty($nickname)) {
if (!$this->_checkNickname($nickname)) {
- $msg = sprintf(_m("Posts from nickname '%s' disallowed."),
+ // TRANS: Exception thrown trying to post a notice while having a blocked nickname. %s is the blocked nickname.
+ $msg = sprintf(_m("Posts from nickname \"%s\" disallowed."),
$nickname);
throw new ClientException($msg);
}
/**
* Check URLs and homepages for blacklisted users.
*/
-
function onStartSubscribe($subscriber, $other)
{
foreach (array($other->profileurl, $other->homepage) as $url) {
$url = strtolower($url);
if (!$this->_checkUrl($url)) {
- $msg = sprintf(_m("Users from '%s' blocked."),
+ // TRANS: Client exception thrown trying to subscribe to a person with a blocked homepage or site URL. %s is the blocked URL.
+ $msg = sprintf(_m("Users from \"%s\" blocked."),
$url);
throw new ClientException($msg);
}
if (!empty($nickname)) {
if (!$this->_checkNickname($nickname)) {
- $msg = sprintf(_m("Can't subscribe to nickname '%s'."),
+ // TRANS: Client exception thrown trying to subscribe to a person with a blocked nickname. %s is the blocked nickname.
+ $msg = sprintf(_m("Can't subscribe to nickname \"%s\"."),
$nickname);
throw new ClientException($msg);
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
-
class FollowEveryonePlugin extends Plugin
{
/**
* @return boolean hook value
*
*/
-
function onEndUserRegister(&$newProfile, &$newUser)
{
$otherUser = new User();
*
* @return boolean hook value; true means continue processing, false means stop.
*/
-
function onCheckSchema()
{
$schema = Schema::get();
*
* @return boolean hook value; true means continue processing, false means stop.
*/
-
function onAutoload($cls)
{
$dir = dirname(__FILE__);
*
* @return boolean hook value
*/
-
function onEndProfileFormData($action)
{
$user = common_current_user();
*
* @return boolean hook value
*/
-
function onEndProfileSaveForm($action)
{
$user = common_current_user();
* @return boolean hook value
*
*/
-
function onPluginVersion(&$versions)
{
$versions[] = array('name' => 'FollowEveryone',
*
* @see DB_DataObject
*/
-
class User_followeveryone_prefs extends Memcached_DataObject
{
public $__table = 'user_followeveryone_prefs'; // table name
* @param mixed $v Value to lookup
*
* @return User_followeveryone_prefs object found, or null for no hits
- *
*/
function staticGet($k, $v=null)
{