Merge branch '1.0.x' into schema-x
This commit is contained in:
commit
0229c22d23
12
README
12
README
|
@ -3,7 +3,7 @@ README
|
||||||
------
|
------
|
||||||
|
|
||||||
StatusNet 0.9.6 "Man on the Moon"
|
StatusNet 0.9.6 "Man on the Moon"
|
||||||
25 October 2010 - RELEASE CANDIDATE
|
29 October 2010
|
||||||
|
|
||||||
This is the README file for StatusNet, the Open Source microblogging
|
This is the README file for StatusNet, the Open Source microblogging
|
||||||
platform. It includes installation instructions, descriptions of
|
platform. It includes installation instructions, descriptions of
|
||||||
|
@ -122,6 +122,16 @@ Notable changes this version:
|
||||||
- Header metadata on notice pages to aid in manual reposting on Facebook
|
- Header metadata on notice pages to aid in manual reposting on Facebook
|
||||||
- Lots of little fixes...
|
- Lots of little fixes...
|
||||||
|
|
||||||
|
Changes from 0.9.6 release candidate 1:
|
||||||
|
- fix for broken group pages when logged out
|
||||||
|
- fix for stuck ping queue entries when bad profile
|
||||||
|
- fix for bogus single-user nickname config entry error
|
||||||
|
- i18n updates
|
||||||
|
- nofollow updates
|
||||||
|
- SSL-only mode secure cookie fix
|
||||||
|
- experimental ApiLogger plugin for usage data gathering
|
||||||
|
- experimental follow-everyone plugin
|
||||||
|
|
||||||
A full changelog is available at http://status.net/wiki/StatusNet_0.9.6.
|
A full changelog is available at http://status.net/wiki/StatusNet_0.9.6.
|
||||||
|
|
||||||
Prerequisites
|
Prerequisites
|
||||||
|
|
|
@ -42,7 +42,6 @@ require_once INSTALLDIR.'/lib/attachmentlist.php';
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AttachmentAction extends Action
|
class AttachmentAction extends Action
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -70,6 +69,7 @@ class AttachmentAction extends Action
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($this->attachment)) {
|
if (empty($this->attachment)) {
|
||||||
|
// TRANS: Client error displayed trying to get a non-existing attachment.
|
||||||
$this->clientError(_('No such attachment.'), 404);
|
$this->clientError(_('No such attachment.'), 404);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,6 @@ class AttachmentAction extends Action
|
||||||
*
|
*
|
||||||
* @return boolean true
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function isReadOnly($args)
|
function isReadOnly($args)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
@ -129,7 +128,6 @@ class AttachmentAction extends Action
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
|
@ -150,7 +148,6 @@ class AttachmentAction extends Action
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showLocalNavBlock()
|
function showLocalNavBlock()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -162,7 +159,6 @@ class AttachmentAction extends Action
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
$ali = new Attachment($this->attachment, $this);
|
$ali = new Attachment($this->attachment, $this);
|
||||||
|
@ -174,7 +170,6 @@ class AttachmentAction extends Action
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showPageNoticeBlock()
|
function showPageNoticeBlock()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -191,4 +186,3 @@ class AttachmentAction extends Action
|
||||||
$atcs->show();
|
$atcs->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ require_once INSTALLDIR.'/actions/attachment.php';
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Attachment_ajaxAction extends AttachmentAction
|
class Attachment_ajaxAction extends AttachmentAction
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -80,4 +79,3 @@ class Attachment_ajaxAction extends AttachmentAction
|
||||||
$this->elementEnd('div');
|
$this->elementEnd('div');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,10 +42,8 @@ require_once INSTALLDIR.'/actions/attachment.php';
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Attachment_thumbnailAction extends AttachmentAction
|
class Attachment_thumbnailAction extends AttachmentAction
|
||||||
{
|
{
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
$this->showPage();
|
$this->showPage();
|
||||||
|
@ -79,6 +77,4 @@ class Attachment_thumbnailAction extends AttachmentAction
|
||||||
}
|
}
|
||||||
$this->element('img', array('src' => $file_thumbnail->url, 'alt' => 'Thumbnail'));
|
$this->element('img', array('src' => $file_thumbnail->url, 'alt' => 'Thumbnail'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ class AvatarbynicknameAction extends Action
|
||||||
* Class handler.
|
* Class handler.
|
||||||
*
|
*
|
||||||
* @param array $args query arguments
|
* @param array $args query arguments
|
||||||
*
|
*
|
||||||
* @return boolean false if nickname or user isn't found
|
* @return boolean false if nickname or user isn't found
|
||||||
*/
|
*/
|
||||||
function handle($args)
|
function handle($args)
|
||||||
|
@ -56,27 +56,32 @@ class AvatarbynicknameAction extends Action
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
$nickname = $this->trimmed('nickname');
|
$nickname = $this->trimmed('nickname');
|
||||||
if (!$nickname) {
|
if (!$nickname) {
|
||||||
|
// TRANS: Client error displayed trying to get an avatar without providing a nickname.
|
||||||
$this->clientError(_('No nickname.'));
|
$this->clientError(_('No nickname.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$size = $this->trimmed('size');
|
$size = $this->trimmed('size');
|
||||||
if (!$size) {
|
if (!$size) {
|
||||||
|
// TRANS: Client error displayed trying to get an avatar without providing an avatar size.
|
||||||
$this->clientError(_('No size.'));
|
$this->clientError(_('No size.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$size = strtolower($size);
|
$size = strtolower($size);
|
||||||
if (!in_array($size, array('original', '96', '48', '24'))) {
|
if (!in_array($size, array('original', '96', '48', '24'))) {
|
||||||
|
// TRANS: Client error displayed trying to get an avatar providing an invalid avatar size.
|
||||||
$this->clientError(_('Invalid size.'));
|
$this->clientError(_('Invalid size.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = User::staticGet('nickname', $nickname);
|
$user = User::staticGet('nickname', $nickname);
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
|
// TRANS: Client error displayed trying to get an avatar for a non-existing user.
|
||||||
$this->clientError(_('No such user.'));
|
$this->clientError(_('No such user.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$profile = $user->getProfile();
|
$profile = $user->getProfile();
|
||||||
if (!$profile) {
|
if (!$profile) {
|
||||||
|
// TRANS: Client error displayed trying to get an avatar for a user without a profile.
|
||||||
$this->clientError(_('User has no profile.'));
|
$this->clientError(_('User has no profile.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -103,4 +108,3 @@ class AvatarbynicknameAction extends Action
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,6 @@ define('MAX_ORIGINAL', 480);
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AvatarsettingsAction extends AccountSettingsAction
|
class AvatarsettingsAction extends AccountSettingsAction
|
||||||
{
|
{
|
||||||
var $mode = null;
|
var $mode = null;
|
||||||
|
@ -61,9 +60,9 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
*
|
*
|
||||||
* @return string Title of the page
|
* @return string Title of the page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
|
// TRANS: Title for avatar upload page.
|
||||||
return _('Avatar');
|
return _('Avatar');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,10 +71,12 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
*
|
*
|
||||||
* @return instructions for use
|
* @return instructions for use
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
return sprintf(_('You can upload your personal avatar. The maximum file size is %s.'), ImageFile::maxFileSize());
|
// TRANS: Instruction for avatar upload page.
|
||||||
|
// TRANS: %s is the maximum file size, for example "500b", "10kB" or "2MB".
|
||||||
|
return sprintf(_('You can upload your personal avatar. The maximum file size is %s.'),
|
||||||
|
ImageFile::maxFileSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -103,6 +104,7 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
|
|
||||||
if (!$profile) {
|
if (!$profile) {
|
||||||
common_log_db_error($user, 'SELECT', __FILE__);
|
common_log_db_error($user, 'SELECT', __FILE__);
|
||||||
|
// TRANS: Server error displayed in avatar upload page when no matching profile can be found for a user.
|
||||||
$this->serverError(_('User without matching profile.'));
|
$this->serverError(_('User without matching profile.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -116,14 +118,16 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
'action' =>
|
'action' =>
|
||||||
common_local_url('avatarsettings')));
|
common_local_url('avatarsettings')));
|
||||||
$this->elementStart('fieldset');
|
$this->elementStart('fieldset');
|
||||||
|
// TRANS: Avatar upload page form legend.
|
||||||
$this->element('legend', null, _('Avatar settings'));
|
$this->element('legend', null, _('Avatar settings'));
|
||||||
$this->hidden('token', common_session_token());
|
$this->hidden('token', common_session_token());
|
||||||
|
|
||||||
if (Event::handle('StartAvatarFormData', array($this))) {
|
if (Event::handle('StartAvatarFormData', array($this))) {
|
||||||
$this->elementStart('ul', 'form_data');
|
$this->elementStart('ul', 'form_data');
|
||||||
if ($original) {
|
if ($original) {
|
||||||
$this->elementStart('li', array('id' => 'avatar_original',
|
$this->elementStart('li', array('id' => 'avatar_original',
|
||||||
'class' => 'avatar_view'));
|
'class' => 'avatar_view'));
|
||||||
|
// TRANS: Header on avatar upload page for thumbnail of originally uploaded avatar (h2).
|
||||||
$this->element('h2', null, _("Original"));
|
$this->element('h2', null, _("Original"));
|
||||||
$this->elementStart('div', array('id'=>'avatar_original_view'));
|
$this->elementStart('div', array('id'=>'avatar_original_view'));
|
||||||
$this->element('img', array('src' => $original->url,
|
$this->element('img', array('src' => $original->url,
|
||||||
|
@ -139,6 +143,7 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
if ($avatar) {
|
if ($avatar) {
|
||||||
$this->elementStart('li', array('id' => 'avatar_preview',
|
$this->elementStart('li', array('id' => 'avatar_preview',
|
||||||
'class' => 'avatar_view'));
|
'class' => 'avatar_view'));
|
||||||
|
// TRANS: Header on avatar upload page for thumbnail of to be used rendition of uploaded avatar (h2).
|
||||||
$this->element('h2', null, _("Preview"));
|
$this->element('h2', null, _("Preview"));
|
||||||
$this->elementStart('div', array('id'=>'avatar_preview_view'));
|
$this->elementStart('div', array('id'=>'avatar_preview_view'));
|
||||||
$this->element('img', array('src' => $original->url,
|
$this->element('img', array('src' => $original->url,
|
||||||
|
@ -146,7 +151,8 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
'height' => AVATAR_PROFILE_SIZE,
|
'height' => AVATAR_PROFILE_SIZE,
|
||||||
'alt' => $user->nickname));
|
'alt' => $user->nickname));
|
||||||
$this->elementEnd('div');
|
$this->elementEnd('div');
|
||||||
$this->submit('delete', _('Delete'));
|
// TRANS: Button on avatar upload page to delete current avatar.
|
||||||
|
$this->submit('delete', _m('BUTTON','Delete'));
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,7 +169,8 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
|
|
||||||
$this->elementStart('ul', 'form_actions');
|
$this->elementStart('ul', 'form_actions');
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
$this->submit('upload', _('Upload'));
|
// TRANS: Button on avatar upload page to upload an avatar.
|
||||||
|
$this->submit('upload', _m('BUTTON','Upload'));
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementEnd('ul');
|
$this->elementEnd('ul');
|
||||||
}
|
}
|
||||||
|
@ -171,7 +178,6 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
|
|
||||||
$this->elementEnd('fieldset');
|
$this->elementEnd('fieldset');
|
||||||
$this->elementEnd('form');
|
$this->elementEnd('form');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function showCropForm()
|
function showCropForm()
|
||||||
|
@ -182,6 +188,7 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
|
|
||||||
if (!$profile) {
|
if (!$profile) {
|
||||||
common_log_db_error($user, 'SELECT', __FILE__);
|
common_log_db_error($user, 'SELECT', __FILE__);
|
||||||
|
// TRANS: Server error displayed in avatar upload page when no matching profile can be found for a user.
|
||||||
$this->serverError(_('User without matching profile.'));
|
$this->serverError(_('User without matching profile.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -194,6 +201,7 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
'action' =>
|
'action' =>
|
||||||
common_local_url('avatarsettings')));
|
common_local_url('avatarsettings')));
|
||||||
$this->elementStart('fieldset');
|
$this->elementStart('fieldset');
|
||||||
|
// TRANS: Avatar upload page crop form legend.
|
||||||
$this->element('legend', null, _('Avatar settings'));
|
$this->element('legend', null, _('Avatar settings'));
|
||||||
$this->hidden('token', common_session_token());
|
$this->hidden('token', common_session_token());
|
||||||
|
|
||||||
|
@ -202,6 +210,7 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
$this->elementStart('li',
|
$this->elementStart('li',
|
||||||
array('id' => 'avatar_original',
|
array('id' => 'avatar_original',
|
||||||
'class' => 'avatar_view'));
|
'class' => 'avatar_view'));
|
||||||
|
// TRANS: Header on avatar upload crop form for thumbnail of originally uploaded avatar (h2).
|
||||||
$this->element('h2', null, _("Original"));
|
$this->element('h2', null, _("Original"));
|
||||||
$this->elementStart('div', array('id'=>'avatar_original_view'));
|
$this->elementStart('div', array('id'=>'avatar_original_view'));
|
||||||
$this->element('img', array('src' => Avatar::url($this->filedata['filename']),
|
$this->element('img', array('src' => Avatar::url($this->filedata['filename']),
|
||||||
|
@ -214,6 +223,7 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
$this->elementStart('li',
|
$this->elementStart('li',
|
||||||
array('id' => 'avatar_preview',
|
array('id' => 'avatar_preview',
|
||||||
'class' => 'avatar_view'));
|
'class' => 'avatar_view'));
|
||||||
|
// TRANS: Header on avatar upload crop form for thumbnail of to be used rendition of uploaded avatar (h2).
|
||||||
$this->element('h2', null, _("Preview"));
|
$this->element('h2', null, _("Preview"));
|
||||||
$this->elementStart('div', array('id'=>'avatar_preview_view'));
|
$this->elementStart('div', array('id'=>'avatar_preview_view'));
|
||||||
$this->element('img', array('src' => Avatar::url($this->filedata['filename']),
|
$this->element('img', array('src' => Avatar::url($this->filedata['filename']),
|
||||||
|
@ -228,13 +238,14 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
'type' => 'hidden',
|
'type' => 'hidden',
|
||||||
'id' => $crop_info));
|
'id' => $crop_info));
|
||||||
}
|
}
|
||||||
$this->submit('crop', _('Crop'));
|
|
||||||
|
// TRANS: Button on avatar upload crop form to confirm a selected crop as avatar.
|
||||||
|
$this->submit('crop', _m('BUTTON','Crop'));
|
||||||
|
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementEnd('ul');
|
$this->elementEnd('ul');
|
||||||
$this->elementEnd('fieldset');
|
$this->elementEnd('fieldset');
|
||||||
$this->elementEnd('form');
|
$this->elementEnd('form');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -244,7 +255,6 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handlePost()
|
function handlePost()
|
||||||
{
|
{
|
||||||
// Workaround for PHP returning empty $_POST and $_FILES when POST
|
// Workaround for PHP returning empty $_POST and $_FILES when POST
|
||||||
|
@ -271,7 +281,7 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
'Try again, please.'));
|
'Try again, please.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Event::handle('StartAvatarSaveForm', array($this))) {
|
if (Event::handle('StartAvatarSaveForm', array($this))) {
|
||||||
if ($this->arg('upload')) {
|
if ($this->arg('upload')) {
|
||||||
$this->uploadAvatar();
|
$this->uploadAvatar();
|
||||||
|
@ -280,6 +290,7 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
} else if ($this->arg('delete')) {
|
} else if ($this->arg('delete')) {
|
||||||
$this->deleteAvatar();
|
$this->deleteAvatar();
|
||||||
} else {
|
} else {
|
||||||
|
// TRANS: Unexpected validation error on avatar upload form.
|
||||||
$this->showForm(_('Unexpected form submission.'));
|
$this->showForm(_('Unexpected form submission.'));
|
||||||
}
|
}
|
||||||
Event::handle('EndAvatarSaveForm', array($this));
|
Event::handle('EndAvatarSaveForm', array($this));
|
||||||
|
@ -294,7 +305,6 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function uploadAvatar()
|
function uploadAvatar()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
@ -304,6 +314,7 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($imagefile === null) {
|
if ($imagefile === null) {
|
||||||
|
// TRANS: Validation error on avatar upload form when no file was uploaded.
|
||||||
$this->showForm(_('No file uploaded.'));
|
$this->showForm(_('No file uploaded.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -331,6 +342,7 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
|
|
||||||
$this->mode = 'crop';
|
$this->mode = 'crop';
|
||||||
|
|
||||||
|
// TRANS: Avatar upload form unstruction after uploading a file.
|
||||||
$this->showForm(_('Pick a square area of the image to be your avatar'),
|
$this->showForm(_('Pick a square area of the image to be your avatar'),
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
|
@ -340,12 +352,12 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function cropAvatar()
|
function cropAvatar()
|
||||||
{
|
{
|
||||||
$filedata = $_SESSION['FILEDATA'];
|
$filedata = $_SESSION['FILEDATA'];
|
||||||
|
|
||||||
if (!$filedata) {
|
if (!$filedata) {
|
||||||
|
// TRANS: Server error displayed if an avatar upload went wrong somehow server side.
|
||||||
$this->serverError(_('Lost our file data.'));
|
$this->serverError(_('Lost our file data.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -369,24 +381,25 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
@unlink($filedata['filepath']);
|
@unlink($filedata['filepath']);
|
||||||
unset($_SESSION['FILEDATA']);
|
unset($_SESSION['FILEDATA']);
|
||||||
$this->mode = 'upload';
|
$this->mode = 'upload';
|
||||||
|
// TRANS: Success message for having updated a user avatar.
|
||||||
$this->showForm(_('Avatar updated.'), true);
|
$this->showForm(_('Avatar updated.'), true);
|
||||||
common_broadcast_profile($profile);
|
common_broadcast_profile($profile);
|
||||||
} else {
|
} else {
|
||||||
|
// TRANS: Error displayed on the avatar upload page if the avatar could not be updated for an unknown reason.
|
||||||
$this->showForm(_('Failed updating avatar.'));
|
$this->showForm(_('Failed updating avatar.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get rid of the current avatar.
|
* Get rid of the current avatar.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function deleteAvatar()
|
function deleteAvatar()
|
||||||
{
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
$profile = $user->getProfile();
|
$profile = $user->getProfile();
|
||||||
|
|
||||||
$avatar = $profile->getOriginalAvatar();
|
$avatar = $profile->getOriginalAvatar();
|
||||||
if($avatar) $avatar->delete();
|
if($avatar) $avatar->delete();
|
||||||
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
|
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
|
||||||
|
@ -396,6 +409,7 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
$avatar = $profile->getAvatar(AVATAR_MINI_SIZE);
|
$avatar = $profile->getAvatar(AVATAR_MINI_SIZE);
|
||||||
if($avatar) $avatar->delete();
|
if($avatar) $avatar->delete();
|
||||||
|
|
||||||
|
// TRANS: Success message for deleting a user avatar.
|
||||||
$this->showForm(_('Avatar deleted.'), true);
|
$this->showForm(_('Avatar deleted.'), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -416,7 +430,6 @@ class AvatarsettingsAction extends AccountSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showScripts()
|
function showScripts()
|
||||||
{
|
{
|
||||||
parent::showScripts();
|
parent::showScripts();
|
||||||
|
|
|
@ -42,7 +42,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class BlockAction extends ProfileFormAction
|
class BlockAction extends ProfileFormAction
|
||||||
{
|
{
|
||||||
var $profile = null;
|
var $profile = null;
|
||||||
|
@ -54,7 +53,6 @@ class BlockAction extends ProfileFormAction
|
||||||
*
|
*
|
||||||
* @return boolean success flag
|
* @return boolean success flag
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
if (!parent::prepare($args)) {
|
if (!parent::prepare($args)) {
|
||||||
|
@ -66,6 +64,7 @@ class BlockAction extends ProfileFormAction
|
||||||
assert(!empty($cur)); // checked by parent
|
assert(!empty($cur)); // checked by parent
|
||||||
|
|
||||||
if ($cur->hasBlocked($this->profile)) {
|
if ($cur->hasBlocked($this->profile)) {
|
||||||
|
// TRANS: Client error displayed when blocking a user that has already been blocked.
|
||||||
$this->clientError(_('You already blocked that user.'));
|
$this->clientError(_('You already blocked that user.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -82,7 +81,6 @@ class BlockAction extends ProfileFormAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
|
@ -104,6 +102,7 @@ class BlockAction extends ProfileFormAction
|
||||||
}
|
}
|
||||||
|
|
||||||
function title() {
|
function title() {
|
||||||
|
// TRANS: Title for block user page.
|
||||||
return _('Block user');
|
return _('Block user');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,8 +132,10 @@ class BlockAction extends ProfileFormAction
|
||||||
'action' => common_local_url('block')));
|
'action' => common_local_url('block')));
|
||||||
$this->elementStart('fieldset');
|
$this->elementStart('fieldset');
|
||||||
$this->hidden('token', common_session_token());
|
$this->hidden('token', common_session_token());
|
||||||
|
// TRANS: Legend for block user form.
|
||||||
$this->element('legend', _('Block user'));
|
$this->element('legend', _('Block user'));
|
||||||
$this->element('p', null,
|
$this->element('p', null,
|
||||||
|
// TRANS: Explanation of consequences when blocking a user on the block user page.
|
||||||
_('Are you sure you want to block this user? '.
|
_('Are you sure you want to block this user? '.
|
||||||
'Afterwards, they will be unsubscribed from you, '.
|
'Afterwards, they will be unsubscribed from you, '.
|
||||||
'unable to subscribe to you in the future, and '.
|
'unable to subscribe to you in the future, and '.
|
||||||
|
@ -184,6 +185,7 @@ class BlockAction extends ProfileFormAction
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
|
// TRANS: Server error displayed when blocking a user fails.
|
||||||
$this->serverError(_('Failed to save block information.'));
|
$this->serverError(_('Failed to save block information.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -199,7 +201,7 @@ class BlockAction extends ProfileFormAction
|
||||||
* Override for form session token checks; on our first hit we're just
|
* Override for form session token checks; on our first hit we're just
|
||||||
* requesting confirmation, which doesn't need a token. We need to be
|
* requesting confirmation, which doesn't need a token. We need to be
|
||||||
* able to take regular GET requests from email!
|
* able to take regular GET requests from email!
|
||||||
*
|
*
|
||||||
* @throws ClientException if token is bad on POST request or if we have
|
* @throws ClientException if token is bad on POST request or if we have
|
||||||
* confirmation parameters which could trigger something.
|
* confirmation parameters which could trigger something.
|
||||||
*/
|
*/
|
||||||
|
@ -216,7 +218,7 @@ class BlockAction extends ProfileFormAction
|
||||||
/**
|
/**
|
||||||
* If we reached this form without returnto arguments, return to the
|
* If we reached this form without returnto arguments, return to the
|
||||||
* current user's subscription list.
|
* current user's subscription list.
|
||||||
*
|
*
|
||||||
* @return string URL
|
* @return string URL
|
||||||
*/
|
*/
|
||||||
function defaultReturnTo()
|
function defaultReturnTo()
|
||||||
|
|
|
@ -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
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class BlockedfromgroupAction extends GroupDesignAction
|
class BlockedfromgroupAction extends GroupDesignAction
|
||||||
{
|
{
|
||||||
var $page = null;
|
var $page = null;
|
||||||
|
@ -70,6 +69,7 @@ class BlockedfromgroupAction extends GroupDesignAction
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$nickname) {
|
if (!$nickname) {
|
||||||
|
// TRANS: Client error displayed when requesting a list of blocked users for a group without providing a group nickname.
|
||||||
$this->clientError(_('No nickname.'), 404);
|
$this->clientError(_('No nickname.'), 404);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -77,6 +77,7 @@ class BlockedfromgroupAction extends GroupDesignAction
|
||||||
$local = Local_group::staticGet('nickname', $nickname);
|
$local = Local_group::staticGet('nickname', $nickname);
|
||||||
|
|
||||||
if (!$local) {
|
if (!$local) {
|
||||||
|
// TRANS: Client error displayed when requesting a list of blocked users for a non-local group.
|
||||||
$this->clientError(_('No such group.'), 404);
|
$this->clientError(_('No such group.'), 404);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -84,6 +85,7 @@ class BlockedfromgroupAction extends GroupDesignAction
|
||||||
$this->group = User_group::staticGet('id', $local->group_id);
|
$this->group = User_group::staticGet('id', $local->group_id);
|
||||||
|
|
||||||
if (!$this->group) {
|
if (!$this->group) {
|
||||||
|
// TRANS: Client error displayed when requesting a list of blocked users for a non-existing group.
|
||||||
$this->clientError(_('No such group.'), 404);
|
$this->clientError(_('No such group.'), 404);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -94,9 +96,13 @@ class BlockedfromgroupAction extends GroupDesignAction
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
if ($this->page == 1) {
|
if ($this->page == 1) {
|
||||||
|
// TRANS: Title for first page with list of users blocked from a group.
|
||||||
|
// TRANS: %s is a group nickname.
|
||||||
return sprintf(_('%s blocked profiles'),
|
return sprintf(_('%s blocked profiles'),
|
||||||
$this->group->nickname);
|
$this->group->nickname);
|
||||||
} else {
|
} else {
|
||||||
|
// TRANS: Title for any but the first page with list of users blocked from a group.
|
||||||
|
// TRANS: %1$s is a group nickname, %2$d is a page number.
|
||||||
return sprintf(_('%1$s blocked profiles, page %2$d'),
|
return sprintf(_('%1$s blocked profiles, page %2$d'),
|
||||||
$this->group->nickname,
|
$this->group->nickname,
|
||||||
$this->page);
|
$this->page);
|
||||||
|
@ -112,6 +118,7 @@ class BlockedfromgroupAction extends GroupDesignAction
|
||||||
function showPageNotice()
|
function showPageNotice()
|
||||||
{
|
{
|
||||||
$this->element('p', 'instructions',
|
$this->element('p', 'instructions',
|
||||||
|
// TRANS: Instructions for list of users blocked from a group.
|
||||||
_('A list of the users blocked from joining this group.'));
|
_('A list of the users blocked from joining this group.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,7 +212,6 @@ class GroupBlockListItem extends ProfileListItem
|
||||||
*
|
*
|
||||||
* @see UnblockForm
|
* @see UnblockForm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class GroupUnblockForm extends Form
|
class GroupUnblockForm extends Form
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -234,7 +240,6 @@ class GroupUnblockForm extends Form
|
||||||
* @param User_group $group group to block user from
|
* @param User_group $group group to block user from
|
||||||
* @param array $args return-to args
|
* @param array $args return-to args
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function __construct($out=null, $profile=null, $group=null, $args=null)
|
function __construct($out=null, $profile=null, $group=null, $args=null)
|
||||||
{
|
{
|
||||||
parent::__construct($out);
|
parent::__construct($out);
|
||||||
|
@ -249,7 +254,6 @@ class GroupUnblockForm extends Form
|
||||||
*
|
*
|
||||||
* @return int ID of the form
|
* @return int ID of the form
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function id()
|
function id()
|
||||||
{
|
{
|
||||||
// This should be unique for the page.
|
// This should be unique for the page.
|
||||||
|
@ -261,7 +265,6 @@ class GroupUnblockForm extends Form
|
||||||
*
|
*
|
||||||
* @return string class of the form
|
* @return string class of the form
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formClass()
|
function formClass()
|
||||||
{
|
{
|
||||||
return 'form_group_unblock';
|
return 'form_group_unblock';
|
||||||
|
@ -272,7 +275,6 @@ class GroupUnblockForm extends Form
|
||||||
*
|
*
|
||||||
* @return string URL of the action
|
* @return string URL of the action
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function action()
|
function action()
|
||||||
{
|
{
|
||||||
return common_local_url('groupunblock');
|
return common_local_url('groupunblock');
|
||||||
|
@ -285,6 +287,7 @@ class GroupUnblockForm extends Form
|
||||||
*/
|
*/
|
||||||
function formLegend()
|
function formLegend()
|
||||||
{
|
{
|
||||||
|
// TRANS: Form legend for unblocking a user from a group.
|
||||||
$this->out->element('legend', null, _('Unblock user from group'));
|
$this->out->element('legend', null, _('Unblock user from group'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,7 +296,6 @@ class GroupUnblockForm extends Form
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formData()
|
function formData()
|
||||||
{
|
{
|
||||||
$this->out->hidden('unblockto-' . $this->profile->id,
|
$this->out->hidden('unblockto-' . $this->profile->id,
|
||||||
|
@ -314,9 +316,14 @@ class GroupUnblockForm extends Form
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formActions()
|
function formActions()
|
||||||
{
|
{
|
||||||
$this->out->submit('submit', _('Unblock'), 'submit', null, _('Unblock this user'));
|
$this->out->submit('submit',
|
||||||
|
// TRANS: Button text for unblocking a user from a group.
|
||||||
|
_m('BUTTON','Unblock'),
|
||||||
|
'submit',
|
||||||
|
null,
|
||||||
|
// TRANS: Tooltip for button for unblocking a user from a group.
|
||||||
|
_('Unblock this user'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
require_once INSTALLDIR . '/actions/newnotice.php';
|
require_once INSTALLDIR . '/actions/newnotice.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action for posting a notice
|
* Action for posting a notice
|
||||||
*
|
*
|
||||||
* @category Bookmarklet
|
* @category Bookmarklet
|
||||||
* @package StatusNet
|
* @package StatusNet
|
||||||
|
@ -42,12 +42,12 @@ require_once INSTALLDIR . '/actions/newnotice.php';
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class BookmarkletAction extends NewnoticeAction
|
class BookmarkletAction extends NewnoticeAction
|
||||||
{
|
{
|
||||||
function showTitle()
|
function showTitle()
|
||||||
{
|
{
|
||||||
// TRANS: Title for mini-posting window loaded from bookmarklet.
|
// TRANS: Title for mini-posting window loaded from bookmarklet.
|
||||||
|
// TRANS: %s is the StatusNet site name.
|
||||||
$this->element('title', null, sprintf(_('Post to %s'), common_config('site', 'name')));
|
$this->element('title', null, sprintf(_('Post to %s'), common_config('site', 'name')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,4 +73,3 @@ class BookmarkletAction extends NewnoticeAction
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,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
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ConfirmaddressAction extends Action
|
class ConfirmaddressAction extends Action
|
||||||
{
|
{
|
||||||
/** type of confirmation. */
|
/** type of confirmation. */
|
||||||
|
@ -61,7 +60,6 @@ class ConfirmaddressAction extends Action
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
|
@ -72,16 +70,19 @@ class ConfirmaddressAction extends Action
|
||||||
}
|
}
|
||||||
$code = $this->trimmed('code');
|
$code = $this->trimmed('code');
|
||||||
if (!$code) {
|
if (!$code) {
|
||||||
|
// TRANS: Client error displayed when not providing a confirmation code in the contact address confirmation action.
|
||||||
$this->clientError(_('No confirmation code.'));
|
$this->clientError(_('No confirmation code.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$confirm = Confirm_address::staticGet('code', $code);
|
$confirm = Confirm_address::staticGet('code', $code);
|
||||||
if (!$confirm) {
|
if (!$confirm) {
|
||||||
|
// TRANS: Client error displayed when providing a non-existing confirmation code in the contact address confirmation action.
|
||||||
$this->clientError(_('Confirmation code not found.'));
|
$this->clientError(_('Confirmation code not found.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$cur = common_current_user();
|
$cur = common_current_user();
|
||||||
if ($cur->id != $confirm->user_id) {
|
if ($cur->id != $confirm->user_id) {
|
||||||
|
// TRANS: Client error displayed when not providing a confirmation code for another user in the contact address confirmation action.
|
||||||
$this->clientError(_('That confirmation code is not for you!'));
|
$this->clientError(_('That confirmation code is not for you!'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -98,6 +99,7 @@ class ConfirmaddressAction extends Action
|
||||||
if (in_array($type, array('email', 'sms')))
|
if (in_array($type, array('email', 'sms')))
|
||||||
{
|
{
|
||||||
if ($cur->$type == $confirm->address) {
|
if ($cur->$type == $confirm->address) {
|
||||||
|
// TRANS: Client error for an already confirmed email/jabber/sms address.
|
||||||
$this->clientError(_('That address has already been confirmed.'));
|
$this->clientError(_('That address has already been confirmed.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -162,7 +164,9 @@ class ConfirmaddressAction extends Action
|
||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log_db_error($confirm, 'DELETE', __FILE__);
|
common_log_db_error($confirm, 'DELETE', __FILE__);
|
||||||
$this->serverError(_('Couldn\'t delete email confirmation.'));
|
// TRANS: Server error displayed when an address confirmation code deletion from the
|
||||||
|
// TRANS: database fails in the contact address confirmation action.
|
||||||
|
$this->serverError(_('Could not delete address confirmation.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,9 +179,9 @@ class ConfirmaddressAction extends Action
|
||||||
*
|
*
|
||||||
* @return string title
|
* @return string title
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
|
// TRANS: Title for the contact address confirmation action.
|
||||||
return _('Confirm address');
|
return _('Confirm address');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,12 +190,13 @@ class ConfirmaddressAction extends Action
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
$cur = common_current_user();
|
$cur = common_current_user();
|
||||||
|
|
||||||
$this->element('p', null,
|
$this->element('p', null,
|
||||||
|
// TRANS: Success message for the contact address confirmation action.
|
||||||
|
// TRANS: %s can be 'email', 'jabber', or 'sms'.
|
||||||
sprintf(_('The address "%s" has been '.
|
sprintf(_('The address "%s" has been '.
|
||||||
'confirmed for your account.'),
|
'confirmed for your account.'),
|
||||||
$this->address));
|
$this->address));
|
||||||
|
|
|
@ -45,7 +45,6 @@ require_once INSTALLDIR.'/lib/noticelist.php';
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ConversationAction extends Action
|
class ConversationAction extends Action
|
||||||
{
|
{
|
||||||
var $id = null;
|
var $id = null;
|
||||||
|
@ -58,7 +57,6 @@ class ConversationAction extends Action
|
||||||
*
|
*
|
||||||
* @return boolean false if id not passed in
|
* @return boolean false if id not passed in
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
|
@ -81,7 +79,6 @@ class ConversationAction extends Action
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
|
@ -93,10 +90,10 @@ class ConversationAction extends Action
|
||||||
*
|
*
|
||||||
* @return string page title
|
* @return string page title
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
return _("Conversation");
|
// TRANS: Title for page with a conversion (multiple notices in context).
|
||||||
|
return _('Conversation');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -107,7 +104,6 @@ class ConversationAction extends Action
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
$notices = Notice::conversationStream($this->id, null, null);
|
$notices = Notice::conversationStream($this->id, null, null);
|
||||||
|
@ -134,7 +130,6 @@ class ConversationAction extends Action
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ConversationTree extends NoticeList
|
class ConversationTree extends NoticeList
|
||||||
{
|
{
|
||||||
var $tree = null;
|
var $tree = null;
|
||||||
|
@ -145,12 +140,12 @@ class ConversationTree extends NoticeList
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function show()
|
function show()
|
||||||
{
|
{
|
||||||
$cnt = $this->_buildTree();
|
$cnt = $this->_buildTree();
|
||||||
|
|
||||||
$this->out->elementStart('div', array('id' =>'notices_primary'));
|
$this->out->elementStart('div', array('id' =>'notices_primary'));
|
||||||
|
// TRANS: Header on conversation page. Hidden by default (h2).
|
||||||
$this->out->element('h2', null, _('Notices'));
|
$this->out->element('h2', null, _('Notices'));
|
||||||
$this->out->elementStart('ol', array('class' => 'notices xoxo'));
|
$this->out->elementStart('ol', array('class' => 'notices xoxo'));
|
||||||
|
|
||||||
|
@ -200,7 +195,6 @@ class ConversationTree extends NoticeList
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showNoticePlus($id)
|
function showNoticePlus($id)
|
||||||
{
|
{
|
||||||
$notice = $this->table[$id];
|
$notice = $this->table[$id];
|
||||||
|
@ -237,7 +231,6 @@ class ConversationTree extends NoticeList
|
||||||
*
|
*
|
||||||
* @return NoticeListItem a list item to show
|
* @return NoticeListItem a list item to show
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function newListItem($notice)
|
function newListItem($notice)
|
||||||
{
|
{
|
||||||
return new ConversationTreeItem($notice, $this->out);
|
return new ConversationTreeItem($notice, $this->out);
|
||||||
|
@ -255,7 +248,6 @@ class ConversationTree extends NoticeList
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ConversationTreeItem extends NoticeListItem
|
class ConversationTreeItem extends NoticeListItem
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -266,7 +258,6 @@ class ConversationTreeItem extends NoticeListItem
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showStart()
|
function showStart()
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -280,7 +271,6 @@ class ConversationTreeItem extends NoticeListItem
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showEnd()
|
function showEnd()
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -293,7 +283,6 @@ class ConversationTreeItem extends NoticeListItem
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showContext()
|
function showContext()
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -40,7 +40,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class DeleteapplicationAction extends Action
|
class DeleteapplicationAction extends Action
|
||||||
{
|
{
|
||||||
var $app = null;
|
var $app = null;
|
||||||
|
@ -52,7 +51,6 @@ class DeleteapplicationAction extends Action
|
||||||
*
|
*
|
||||||
* @return boolean success flag
|
* @return boolean success flag
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
if (!parent::prepare($args)) {
|
if (!parent::prepare($args)) {
|
||||||
|
@ -60,6 +58,7 @@ class DeleteapplicationAction extends Action
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!common_logged_in()) {
|
if (!common_logged_in()) {
|
||||||
|
// TRANS: Client error displayed trying to delete an application while not logged in.
|
||||||
$this->clientError(_('You must be logged in to delete an application.'));
|
$this->clientError(_('You must be logged in to delete an application.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -68,6 +67,7 @@ class DeleteapplicationAction extends Action
|
||||||
$this->app = Oauth_application::staticGet('id', $id);
|
$this->app = Oauth_application::staticGet('id', $id);
|
||||||
|
|
||||||
if (empty($this->app)) {
|
if (empty($this->app)) {
|
||||||
|
// TRANS: Client error displayed trying to delete an application that does not exist.
|
||||||
$this->clientError(_('Application not found.'));
|
$this->clientError(_('Application not found.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -75,6 +75,7 @@ class DeleteapplicationAction extends Action
|
||||||
$cur = common_current_user();
|
$cur = common_current_user();
|
||||||
|
|
||||||
if ($cur->id != $this->app->owner) {
|
if ($cur->id != $this->app->owner) {
|
||||||
|
// TRANS: Client error displayed trying to delete an application the current user does not own.
|
||||||
$this->clientError(_('You are not the owner of this application.'), 401);
|
$this->clientError(_('You are not the owner of this application.'), 401);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -91,7 +92,6 @@ class DeleteapplicationAction extends Action
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
|
@ -120,6 +120,7 @@ class DeleteapplicationAction extends Action
|
||||||
}
|
}
|
||||||
|
|
||||||
function title() {
|
function title() {
|
||||||
|
// TRANS: Title for delete application page.
|
||||||
return _('Delete application');
|
return _('Delete application');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,8 +145,10 @@ class DeleteapplicationAction extends Action
|
||||||
array('id' => $this->app->id))));
|
array('id' => $this->app->id))));
|
||||||
$this->elementStart('fieldset');
|
$this->elementStart('fieldset');
|
||||||
$this->hidden('token', common_session_token());
|
$this->hidden('token', common_session_token());
|
||||||
|
// TRANS: Fieldset legend on delete application page.
|
||||||
$this->element('legend', _('Delete application'));
|
$this->element('legend', _('Delete application'));
|
||||||
$this->element('p', null,
|
$this->element('p', null,
|
||||||
|
// TRANS: Confirmation text on delete application page.
|
||||||
_('Are you sure you want to delete this application? '.
|
_('Are you sure you want to delete this application? '.
|
||||||
'This will clear all data about the application from the '.
|
'This will clear all data about the application from the '.
|
||||||
'database, including all existing user connections.'));
|
'database, including all existing user connections.'));
|
||||||
|
@ -171,10 +174,8 @@ class DeleteapplicationAction extends Action
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handlePost()
|
function handlePost()
|
||||||
{
|
{
|
||||||
$this->app->delete();
|
$this->app->delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -172,7 +172,7 @@ class DeletegroupAction extends RedirectingAction
|
||||||
}
|
}
|
||||||
|
|
||||||
function title() {
|
function title() {
|
||||||
// TRANS: Title.
|
// TRANS: Title of delete group page.
|
||||||
return _('Delete group');
|
return _('Delete group');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,8 +201,8 @@ class DeletegroupAction extends RedirectingAction
|
||||||
// TRANS: Form legend for deleting a group.
|
// TRANS: Form legend for deleting a group.
|
||||||
$this->element('legend', _('Delete group'));
|
$this->element('legend', _('Delete group'));
|
||||||
if (Event::handle('StartDeleteGroupForm', array($this, $this->group))) {
|
if (Event::handle('StartDeleteGroupForm', array($this, $this->group))) {
|
||||||
// TRANS: Warning in form for deleleting a group.
|
|
||||||
$this->element('p', null,
|
$this->element('p', null,
|
||||||
|
// TRANS: Warning in form for deleleting a group.
|
||||||
_('Are you sure you want to delete this group? '.
|
_('Are you sure you want to delete this group? '.
|
||||||
'This will clear all data about the group from the '.
|
'This will clear all data about the group from the '.
|
||||||
'database, without a backup. ' .
|
'database, without a backup. ' .
|
||||||
|
|
|
@ -32,6 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @todo FIXME: documentation needed.
|
||||||
class DeletenoticeAction extends Action
|
class DeletenoticeAction extends Action
|
||||||
{
|
{
|
||||||
var $error = null;
|
var $error = null;
|
||||||
|
@ -47,6 +48,7 @@ class DeletenoticeAction extends Action
|
||||||
$this->user = common_current_user();
|
$this->user = common_current_user();
|
||||||
|
|
||||||
if (!$this->user) {
|
if (!$this->user) {
|
||||||
|
// TRANS: Error message displayed trying to delete a notice while not logged in.
|
||||||
common_user_error(_('Not logged in.'));
|
common_user_error(_('Not logged in.'));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -55,6 +57,7 @@ class DeletenoticeAction extends Action
|
||||||
$this->notice = Notice::staticGet($notice_id);
|
$this->notice = Notice::staticGet($notice_id);
|
||||||
|
|
||||||
if (!$this->notice) {
|
if (!$this->notice) {
|
||||||
|
// TRANS: Error message displayed trying to delete a non-existing notice.
|
||||||
common_user_error(_('No such notice.'));
|
common_user_error(_('No such notice.'));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -71,6 +74,7 @@ class DeletenoticeAction extends Action
|
||||||
|
|
||||||
if ($this->notice->profile_id != $this->user_profile->id &&
|
if ($this->notice->profile_id != $this->user_profile->id &&
|
||||||
!$this->user->hasRight(Right::DELETEOTHERSNOTICE)) {
|
!$this->user->hasRight(Right::DELETEOTHERSNOTICE)) {
|
||||||
|
// TRANS: Error message displayed trying to delete a notice that was not made by the current user.
|
||||||
common_user_error(_('Can\'t delete this notice.'));
|
common_user_error(_('Can\'t delete this notice.'));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -90,7 +94,6 @@ class DeletenoticeAction extends Action
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showPageNotice()
|
function showPageNotice()
|
||||||
{
|
{
|
||||||
$instr = $this->getInstructions();
|
$instr = $this->getInstructions();
|
||||||
|
@ -103,12 +106,14 @@ class DeletenoticeAction extends Action
|
||||||
|
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
|
// TRANS: Instructions for deleting a notice.
|
||||||
return _('You are about to permanently delete a notice. ' .
|
return _('You are about to permanently delete a notice. ' .
|
||||||
'Once this is done, it cannot be undone.');
|
'Once this is done, it cannot be undone.');
|
||||||
}
|
}
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
|
// TRANS: Page title when deleting a notice.
|
||||||
return _('Delete notice');
|
return _('Delete notice');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +126,6 @@ class DeletenoticeAction extends Action
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showForm($error = null)
|
function showForm($error = null)
|
||||||
{
|
{
|
||||||
$this->error = $error;
|
$this->error = $error;
|
||||||
|
@ -133,7 +137,6 @@ class DeletenoticeAction extends Action
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
$this->elementStart('form', array('id' => 'form_notice_delete',
|
$this->elementStart('form', array('id' => 'form_notice_delete',
|
||||||
|
@ -141,9 +144,11 @@ class DeletenoticeAction extends Action
|
||||||
'method' => 'post',
|
'method' => 'post',
|
||||||
'action' => common_local_url('deletenotice')));
|
'action' => common_local_url('deletenotice')));
|
||||||
$this->elementStart('fieldset');
|
$this->elementStart('fieldset');
|
||||||
|
// TRANS: Fieldset legend for the delete notice form.
|
||||||
$this->element('legend', null, _('Delete notice'));
|
$this->element('legend', null, _('Delete notice'));
|
||||||
$this->hidden('token', common_session_token());
|
$this->hidden('token', common_session_token());
|
||||||
$this->hidden('notice', $this->trimmed('notice'));
|
$this->hidden('notice', $this->trimmed('notice'));
|
||||||
|
// TRANS: Message for the delete notice form.
|
||||||
$this->element('p', null, _('Are you sure you want to delete this notice?'));
|
$this->element('p', null, _('Are you sure you want to delete this notice?'));
|
||||||
$this->submit('form_action-no',
|
$this->submit('form_action-no',
|
||||||
// TRANS: Button label on the delete notice form.
|
// TRANS: Button label on the delete notice form.
|
||||||
|
|
|
@ -185,7 +185,7 @@ class EditApplicationAction extends OwnerDesignAction
|
||||||
return;
|
return;
|
||||||
} elseif (mb_strlen($name) > 255) {
|
} elseif (mb_strlen($name) > 255) {
|
||||||
// TRANS: Validation error shown when providing too long a name in the "Edit application" form.
|
// TRANS: Validation error shown when providing too long a name in the "Edit application" form.
|
||||||
$this->showForm(_('Name is too long (max 255 characters).'));
|
$this->showForm(_('Name is too long (maximum 255 characters).'));
|
||||||
return;
|
return;
|
||||||
} else if ($this->nameExists($name)) {
|
} else if ($this->nameExists($name)) {
|
||||||
// TRANS: Validation error shown when providing a name for an application that already exists in the "Edit application" form.
|
// TRANS: Validation error shown when providing a name for an application that already exists in the "Edit application" form.
|
||||||
|
|
|
@ -45,14 +45,13 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class EditgroupAction extends GroupDesignAction
|
class EditgroupAction extends GroupDesignAction
|
||||||
{
|
{
|
||||||
|
|
||||||
var $msg;
|
var $msg;
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
|
// TRANS: Title for form to edit a group. %s is a group nickname.
|
||||||
return sprintf(_('Edit %s group'), $this->group->nickname);
|
return sprintf(_('Edit %s group'), $this->group->nickname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,6 +64,7 @@ class EditgroupAction extends GroupDesignAction
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
|
|
||||||
if (!common_logged_in()) {
|
if (!common_logged_in()) {
|
||||||
|
// TRANS: Client error displayed trying to edit a group while not logged in.
|
||||||
$this->clientError(_('You must be logged in to create a group.'));
|
$this->clientError(_('You must be logged in to create a group.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -81,6 +81,7 @@ class EditgroupAction extends GroupDesignAction
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$nickname) {
|
if (!$nickname) {
|
||||||
|
// TRANS: Client error displayed trying to edit a group while not proving a nickname for the group to edit.
|
||||||
$this->clientError(_('No nickname.'), 404);
|
$this->clientError(_('No nickname.'), 404);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -97,6 +98,7 @@ class EditgroupAction extends GroupDesignAction
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->group) {
|
if (!$this->group) {
|
||||||
|
// TRANS: Client error displayed trying to edit a non-existing group.
|
||||||
$this->clientError(_('No such group.'), 404);
|
$this->clientError(_('No such group.'), 404);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -104,6 +106,7 @@ class EditgroupAction extends GroupDesignAction
|
||||||
$cur = common_current_user();
|
$cur = common_current_user();
|
||||||
|
|
||||||
if (!$cur->isAdmin($this->group)) {
|
if (!$cur->isAdmin($this->group)) {
|
||||||
|
// TRANS: Client error displayed trying to edit a group while not being a group admin.
|
||||||
$this->clientError(_('You must be an admin to edit the group.'), 403);
|
$this->clientError(_('You must be an admin to edit the group.'), 403);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -120,7 +123,6 @@ class EditgroupAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
|
@ -155,6 +157,7 @@ class EditgroupAction extends GroupDesignAction
|
||||||
$this->element('p', 'error', $this->msg);
|
$this->element('p', 'error', $this->msg);
|
||||||
} else {
|
} else {
|
||||||
$this->element('p', 'instructions',
|
$this->element('p', 'instructions',
|
||||||
|
// TRANS: Form instructions for group edit form.
|
||||||
_('Use this form to edit the group.'));
|
_('Use this form to edit the group.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,6 +172,7 @@ class EditgroupAction extends GroupDesignAction
|
||||||
{
|
{
|
||||||
$cur = common_current_user();
|
$cur = common_current_user();
|
||||||
if (!$cur->isAdmin($this->group)) {
|
if (!$cur->isAdmin($this->group)) {
|
||||||
|
// TRANS: Client error displayed trying to edit a group while not being a group admin.
|
||||||
$this->clientError(_('You must be an admin to edit the group.'), 403);
|
$this->clientError(_('You must be an admin to edit the group.'), 403);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -183,28 +187,39 @@ class EditgroupAction extends GroupDesignAction
|
||||||
if (!Validate::string($nickname, array('min_length' => 1,
|
if (!Validate::string($nickname, array('min_length' => 1,
|
||||||
'max_length' => 64,
|
'max_length' => 64,
|
||||||
'format' => NICKNAME_FMT))) {
|
'format' => NICKNAME_FMT))) {
|
||||||
|
// TRANS: Group edit form validation error.
|
||||||
$this->showForm(_('Nickname must have only lowercase letters '.
|
$this->showForm(_('Nickname must have only lowercase letters '.
|
||||||
'and numbers and no spaces.'));
|
'and numbers and no spaces.'));
|
||||||
return;
|
return;
|
||||||
} else if ($this->nicknameExists($nickname)) {
|
} else if ($this->nicknameExists($nickname)) {
|
||||||
|
// TRANS: Group edit form validation error.
|
||||||
$this->showForm(_('Nickname already in use. Try another one.'));
|
$this->showForm(_('Nickname already in use. Try another one.'));
|
||||||
return;
|
return;
|
||||||
} else if (!User_group::allowedNickname($nickname)) {
|
} else if (!User_group::allowedNickname($nickname)) {
|
||||||
|
// TRANS: Group edit form validation error.
|
||||||
$this->showForm(_('Not a valid nickname.'));
|
$this->showForm(_('Not a valid nickname.'));
|
||||||
return;
|
return;
|
||||||
} else if (!is_null($homepage) && (strlen($homepage) > 0) &&
|
} else if (!is_null($homepage) && (strlen($homepage) > 0) &&
|
||||||
!Validate::uri($homepage,
|
!Validate::uri($homepage,
|
||||||
array('allowed_schemes' =>
|
array('allowed_schemes' =>
|
||||||
array('http', 'https')))) {
|
array('http', 'https')))) {
|
||||||
|
// TRANS: Group edit form validation error.
|
||||||
$this->showForm(_('Homepage is not a valid URL.'));
|
$this->showForm(_('Homepage is not a valid URL.'));
|
||||||
return;
|
return;
|
||||||
} else if (!is_null($fullname) && mb_strlen($fullname) > 255) {
|
} else if (!is_null($fullname) && mb_strlen($fullname) > 255) {
|
||||||
|
// TRANS: Group edit form validation error.
|
||||||
$this->showForm(_('Full name is too long (maximum 255 characters).'));
|
$this->showForm(_('Full name is too long (maximum 255 characters).'));
|
||||||
return;
|
return;
|
||||||
} else if (User_group::descriptionTooLong($description)) {
|
} else if (User_group::descriptionTooLong($description)) {
|
||||||
$this->showForm(sprintf(_('Description is too long (max %d chars).'), User_group::maxDescription()));
|
$this->showForm(sprintf(
|
||||||
|
// TRANS: Group edit form validation error.
|
||||||
|
_m('Description is too long (maximum %d character).',
|
||||||
|
'Description is too long (maximum %d characters).',
|
||||||
|
User_group::maxDescription()),
|
||||||
|
User_group::maxDescription()));
|
||||||
return;
|
return;
|
||||||
} else if (!is_null($location) && mb_strlen($location) > 255) {
|
} else if (!is_null($location) && mb_strlen($location) > 255) {
|
||||||
|
// TRANS: Group edit form validation error.
|
||||||
$this->showForm(_('Location is too long (maximum 255 characters).'));
|
$this->showForm(_('Location is too long (maximum 255 characters).'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -216,7 +231,11 @@ class EditgroupAction extends GroupDesignAction
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($aliases) > common_config('group', 'maxaliases')) {
|
if (count($aliases) > common_config('group', 'maxaliases')) {
|
||||||
$this->showForm(sprintf(_('Too many aliases! Maximum %d.'),
|
// TRANS: Group edit form validation error.
|
||||||
|
// 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')));
|
common_config('group', 'maxaliases')));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -225,16 +244,19 @@ class EditgroupAction extends GroupDesignAction
|
||||||
if (!Validate::string($alias, array('min_length' => 1,
|
if (!Validate::string($alias, array('min_length' => 1,
|
||||||
'max_length' => 64,
|
'max_length' => 64,
|
||||||
'format' => NICKNAME_FMT))) {
|
'format' => NICKNAME_FMT))) {
|
||||||
|
// TRANS: Group edit form validation error.
|
||||||
$this->showForm(sprintf(_('Invalid alias: "%s"'), $alias));
|
$this->showForm(sprintf(_('Invalid alias: "%s"'), $alias));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($this->nicknameExists($alias)) {
|
if ($this->nicknameExists($alias)) {
|
||||||
|
// TRANS: Group edit form validation error.
|
||||||
$this->showForm(sprintf(_('Alias "%s" already in use. Try another one.'),
|
$this->showForm(sprintf(_('Alias "%s" already in use. Try another one.'),
|
||||||
$alias));
|
$alias));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// XXX assumes alphanum nicknames
|
// XXX assumes alphanum nicknames
|
||||||
if (strcmp($alias, $nickname) == 0) {
|
if (strcmp($alias, $nickname) == 0) {
|
||||||
|
// TRANS: Group edit form validation error.
|
||||||
$this->showForm(_('Alias can\'t be the same as nickname.'));
|
$this->showForm(_('Alias can\'t be the same as nickname.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -255,12 +277,14 @@ class EditgroupAction extends GroupDesignAction
|
||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log_db_error($this->group, 'UPDATE', __FILE__);
|
common_log_db_error($this->group, 'UPDATE', __FILE__);
|
||||||
|
// TRANS: Server error displayed when editing a group fails.
|
||||||
$this->serverError(_('Could not update group.'));
|
$this->serverError(_('Could not update group.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->group->setAliases($aliases);
|
$result = $this->group->setAliases($aliases);
|
||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
|
// TRANS: Server error displayed when group aliases could not be added.
|
||||||
$this->serverError(_('Could not create aliases.'));
|
$this->serverError(_('Could not create aliases.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,6 +301,7 @@ class EditgroupAction extends GroupDesignAction
|
||||||
array('nickname' => $nickname)),
|
array('nickname' => $nickname)),
|
||||||
303);
|
303);
|
||||||
} else {
|
} else {
|
||||||
|
// TRANS: Group edit form success message.
|
||||||
$this->showForm(_('Options saved.'));
|
$this->showForm(_('Options saved.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -300,4 +325,3 @@ class EditgroupAction extends GroupDesignAction
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unlock a user from a group
|
* Unblock a user from a group
|
||||||
*
|
*
|
||||||
* @category Action
|
* @category Action
|
||||||
* @package StatusNet
|
* @package StatusNet
|
||||||
|
@ -40,7 +40,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class GroupunblockAction extends Action
|
class GroupunblockAction extends Action
|
||||||
{
|
{
|
||||||
var $profile = null;
|
var $profile = null;
|
||||||
|
@ -53,11 +52,11 @@ class GroupunblockAction extends Action
|
||||||
*
|
*
|
||||||
* @return boolean success flag
|
* @return boolean success flag
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
if (!common_logged_in()) {
|
if (!common_logged_in()) {
|
||||||
|
// TRANS: Client error displayed when trying to unblock a user from a group while not logged in.
|
||||||
$this->clientError(_('Not logged in.'));
|
$this->clientError(_('Not logged in.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -68,11 +67,13 @@ class GroupunblockAction extends Action
|
||||||
}
|
}
|
||||||
$id = $this->trimmed('unblockto');
|
$id = $this->trimmed('unblockto');
|
||||||
if (empty($id)) {
|
if (empty($id)) {
|
||||||
|
// TRANS: Client error displayed when trying to unblock a user from a group without providing a profile.
|
||||||
$this->clientError(_('No profile specified.'));
|
$this->clientError(_('No profile specified.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->profile = Profile::staticGet('id', $id);
|
$this->profile = Profile::staticGet('id', $id);
|
||||||
if (empty($this->profile)) {
|
if (empty($this->profile)) {
|
||||||
|
// TRANS: Client error displayed when trying to unblock a user from a group without providing an existing profile.
|
||||||
$this->clientError(_('No profile with that ID.'));
|
$this->clientError(_('No profile with that ID.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -83,15 +84,18 @@ class GroupunblockAction extends Action
|
||||||
}
|
}
|
||||||
$this->group = User_group::staticGet('id', $group_id);
|
$this->group = User_group::staticGet('id', $group_id);
|
||||||
if (empty($this->group)) {
|
if (empty($this->group)) {
|
||||||
|
// TRANS: Client error displayed when trying to unblock a user from a non-existing group.
|
||||||
$this->clientError(_('No such group.'));
|
$this->clientError(_('No such group.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
if (!$user->isAdmin($this->group)) {
|
if (!$user->isAdmin($this->group)) {
|
||||||
|
// TRANS: Client error displayed when trying to unblock a user from a group without being an administrator for the group.
|
||||||
$this->clientError(_('Only an admin can unblock group members.'), 401);
|
$this->clientError(_('Only an admin can unblock group members.'), 401);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!Group_block::isBlocked($this->group, $this->profile)) {
|
if (!Group_block::isBlocked($this->group, $this->profile)) {
|
||||||
|
// TRANS: Client error displayed when trying to unblock a non-blocked user from a group.
|
||||||
$this->clientError(_('User is not blocked from group.'));
|
$this->clientError(_('User is not blocked from group.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -105,7 +109,6 @@ class GroupunblockAction extends Action
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
|
@ -119,12 +122,12 @@ class GroupunblockAction extends Action
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function unblockProfile()
|
function unblockProfile()
|
||||||
{
|
{
|
||||||
$result = Group_block::unblockProfile($this->group, $this->profile);
|
$result = Group_block::unblockProfile($this->group, $this->profile);
|
||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
|
// TRANS: Server error displayed when unblocking a user from a group fails because of an unknown error.
|
||||||
$this->serverError(_('Error removing the block.'));
|
$this->serverError(_('Error removing the block.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -146,4 +149,3 @@ class GroupunblockAction extends Action
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,7 @@ class LicenseadminpanelAction extends AdminPanelAction
|
||||||
// Make sure the license title is not too long
|
// Make sure the license title is not too long
|
||||||
if (mb_strlen($values['license']['type']) > 255) {
|
if (mb_strlen($values['license']['type']) > 255) {
|
||||||
$this->clientError(
|
$this->clientError(
|
||||||
_("Invalid license title. Max length is 255 characters.")
|
_('Invalid license title. Maximum length is 255 characters.')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ class NewApplicationAction extends OwnerDesignAction
|
||||||
$this->showForm(_('Name already in use. Try another one.'));
|
$this->showForm(_('Name already in use. Try another one.'));
|
||||||
return;
|
return;
|
||||||
} elseif (mb_strlen($name) > 255) {
|
} elseif (mb_strlen($name) > 255) {
|
||||||
$this->showForm(_('Name is too long (maximum 255 chars).'));
|
$this->showForm(_('Name is too long (maximum 255 characters).'));
|
||||||
return;
|
return;
|
||||||
} elseif (empty($description)) {
|
} elseif (empty($description)) {
|
||||||
$this->showForm(_('Description is required.'));
|
$this->showForm(_('Description is required.'));
|
||||||
|
@ -196,7 +196,7 @@ class NewApplicationAction extends OwnerDesignAction
|
||||||
$this->showForm(_('Organization is required.'));
|
$this->showForm(_('Organization is required.'));
|
||||||
return;
|
return;
|
||||||
} elseif (mb_strlen($organization) > 255) {
|
} elseif (mb_strlen($organization) > 255) {
|
||||||
$this->showForm(_('Organization is too long (maximum 255 chars).'));
|
$this->showForm(_('Organization is too long (maximum 255 characters).'));
|
||||||
return;
|
return;
|
||||||
} elseif (empty($homepage)) {
|
} elseif (empty($homepage)) {
|
||||||
$this->showForm(_('Organization homepage is required.'));
|
$this->showForm(_('Organization homepage is required.'));
|
||||||
|
|
|
@ -43,25 +43,25 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class NewgroupAction extends Action
|
class NewgroupAction extends Action
|
||||||
{
|
{
|
||||||
var $msg;
|
var $msg;
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
|
// TRANS: Title for form to create a group.
|
||||||
return _('New group');
|
return _('New group');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepare to run
|
* Prepare to run
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
|
|
||||||
if (!common_logged_in()) {
|
if (!common_logged_in()) {
|
||||||
|
// TRANS: Client error displayed trying to create a group while not logged in.
|
||||||
$this->clientError(_('You must be logged in to create a group.'));
|
$this->clientError(_('You must be logged in to create a group.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,6 @@ class NewgroupAction extends Action
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
|
@ -107,6 +106,7 @@ class NewgroupAction extends Action
|
||||||
$this->element('p', 'error', $this->msg);
|
$this->element('p', 'error', $this->msg);
|
||||||
} else {
|
} else {
|
||||||
$this->element('p', 'instructions',
|
$this->element('p', 'instructions',
|
||||||
|
// TRANS: Form instructions for group create form.
|
||||||
_('Use this form to create a new group.'));
|
_('Use this form to create a new group.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,33 +123,39 @@ class NewgroupAction extends Action
|
||||||
if (!Validate::string($nickname, array('min_length' => 1,
|
if (!Validate::string($nickname, array('min_length' => 1,
|
||||||
'max_length' => 64,
|
'max_length' => 64,
|
||||||
'format' => NICKNAME_FMT))) {
|
'format' => NICKNAME_FMT))) {
|
||||||
|
// TRANS: Group create form validation error.
|
||||||
$this->showForm(_('Nickname must have only lowercase letters '.
|
$this->showForm(_('Nickname must have only lowercase letters '.
|
||||||
'and numbers and no spaces.'));
|
'and numbers and no spaces.'));
|
||||||
return;
|
return;
|
||||||
} else if ($this->nicknameExists($nickname)) {
|
} else if ($this->nicknameExists($nickname)) {
|
||||||
|
// TRANS: Group create form validation error.
|
||||||
$this->showForm(_('Nickname already in use. Try another one.'));
|
$this->showForm(_('Nickname already in use. Try another one.'));
|
||||||
return;
|
return;
|
||||||
} else if (!User_group::allowedNickname($nickname)) {
|
} else if (!User_group::allowedNickname($nickname)) {
|
||||||
|
// TRANS: Group create form validation error.
|
||||||
$this->showForm(_('Not a valid nickname.'));
|
$this->showForm(_('Not a valid nickname.'));
|
||||||
return;
|
return;
|
||||||
} else if (!is_null($homepage) && (strlen($homepage) > 0) &&
|
} else if (!is_null($homepage) && (strlen($homepage) > 0) &&
|
||||||
!Validate::uri($homepage,
|
!Validate::uri($homepage,
|
||||||
array('allowed_schemes' =>
|
array('allowed_schemes' =>
|
||||||
array('http', 'https')))) {
|
array('http', 'https')))) {
|
||||||
|
// TRANS: Group create form validation error.
|
||||||
$this->showForm(_('Homepage is not a valid URL.'));
|
$this->showForm(_('Homepage is not a valid URL.'));
|
||||||
return;
|
return;
|
||||||
} else if (!is_null($fullname) && mb_strlen($fullname) > 255) {
|
} else if (!is_null($fullname) && mb_strlen($fullname) > 255) {
|
||||||
|
// TRANS: Group create form validation error.
|
||||||
$this->showForm(_('Full name is too long (maximum 255 characters).'));
|
$this->showForm(_('Full name is too long (maximum 255 characters).'));
|
||||||
return;
|
return;
|
||||||
} else if (User_group::descriptionTooLong($description)) {
|
} else if (User_group::descriptionTooLong($description)) {
|
||||||
// TRANS: Form validation error creating a new group because the description is too long.
|
// TRANS: Group create form validation error.
|
||||||
// TRANS: %d is the maximum number of allowed characters.
|
// TRANS: %d is the maximum number of allowed characters.
|
||||||
$this->showForm(sprintf(_m('Description is too long (maximum %d character).',
|
$this->showForm(sprintf(_m('Description is too long (maximum %d character).',
|
||||||
'Description is too long (maximum %d characters).',
|
'Description is too long (maximum %d characters).',
|
||||||
User_group::maxDescription(),
|
User_group::maxDescription()),
|
||||||
User_group::maxDescription()));
|
User_group::maxDescription()));
|
||||||
return;
|
return;
|
||||||
} else if (!is_null($location) && mb_strlen($location) > 255) {
|
} else if (!is_null($location) && mb_strlen($location) > 255) {
|
||||||
|
// TRANS: Group create form validation error.
|
||||||
$this->showForm(_('Location is too long (maximum 255 characters).'));
|
$this->showForm(_('Location is too long (maximum 255 characters).'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -161,7 +167,7 @@ class NewgroupAction extends Action
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($aliases) > common_config('group', 'maxaliases')) {
|
if (count($aliases) > common_config('group', 'maxaliases')) {
|
||||||
// TRANS: Client error shown when providing too many aliases during group creation.
|
// TRANS: Group create form validation error.
|
||||||
// TRANS: %d is the maximum number of allowed aliases.
|
// TRANS: %d is the maximum number of allowed aliases.
|
||||||
$this->showForm(sprintf(_m('Too many aliases! Maximum %d allowed.',
|
$this->showForm(sprintf(_m('Too many aliases! Maximum %d allowed.',
|
||||||
'Too many aliases! Maximum %d allowed.',
|
'Too many aliases! Maximum %d allowed.',
|
||||||
|
@ -174,16 +180,19 @@ class NewgroupAction extends Action
|
||||||
if (!Validate::string($alias, array('min_length' => 1,
|
if (!Validate::string($alias, array('min_length' => 1,
|
||||||
'max_length' => 64,
|
'max_length' => 64,
|
||||||
'format' => NICKNAME_FMT))) {
|
'format' => NICKNAME_FMT))) {
|
||||||
|
// TRANS: Group create form validation error.
|
||||||
$this->showForm(sprintf(_('Invalid alias: "%s"'), $alias));
|
$this->showForm(sprintf(_('Invalid alias: "%s"'), $alias));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($this->nicknameExists($alias)) {
|
if ($this->nicknameExists($alias)) {
|
||||||
|
// TRANS: Group create form validation error.
|
||||||
$this->showForm(sprintf(_('Alias "%s" already in use. Try another one.'),
|
$this->showForm(sprintf(_('Alias "%s" already in use. Try another one.'),
|
||||||
$alias));
|
$alias));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// XXX assumes alphanum nicknames
|
// XXX assumes alphanum nicknames
|
||||||
if (strcmp($alias, $nickname) == 0) {
|
if (strcmp($alias, $nickname) == 0) {
|
||||||
|
// TRANS: Group create form validation error.
|
||||||
$this->showForm(_('Alias can\'t be the same as nickname.'));
|
$this->showForm(_('Alias can\'t be the same as nickname.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -227,4 +236,3 @@ class NewgroupAction extends Action
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -156,8 +156,11 @@ class NewnoticeAction extends Action
|
||||||
|
|
||||||
$content_shortened = common_shorten_links($content);
|
$content_shortened = common_shorten_links($content);
|
||||||
if (Notice::contentTooLong($content_shortened)) {
|
if (Notice::contentTooLong($content_shortened)) {
|
||||||
$this->clientError(sprintf(_('That\'s too long. '.
|
// TRANS: Client error displayed when the parameter "status" is missing.
|
||||||
'Max notice size is %d chars.'),
|
// TRANS: %d is the maximum number of character for a notice.
|
||||||
|
$this->clientError(sprintf(_m('That\'s too long. Maximum notice size is %d character.',
|
||||||
|
'That\'s too long. Maximum notice size is %d characters.',
|
||||||
|
Notice::maxContent()),
|
||||||
Notice::maxContent()));
|
Notice::maxContent()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,12 +181,10 @@ class NewnoticeAction extends Action
|
||||||
|
|
||||||
if (Notice::contentTooLong($content_shortened)) {
|
if (Notice::contentTooLong($content_shortened)) {
|
||||||
$upload->delete();
|
$upload->delete();
|
||||||
$this->clientError(
|
$this->clientError(sprintf(_m('Maximum notice size is %d character, including attachment URL.',
|
||||||
sprintf(
|
'Maximum notice size is %d characters, including attachment URL.',
|
||||||
_('Max notice size is %d chars, including attachment URL.'),
|
Notice::maxContent()),
|
||||||
Notice::maxContent()
|
Notice::maxContent()));
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,6 @@ require_once INSTALLDIR.'/lib/accountsettingsaction.php';
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class OthersettingsAction extends AccountSettingsAction
|
class OthersettingsAction extends AccountSettingsAction
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -54,9 +53,9 @@ class OthersettingsAction extends AccountSettingsAction
|
||||||
*
|
*
|
||||||
* @return string Title of the page
|
* @return string Title of the page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
|
// Page title for a tab in user profile settings.
|
||||||
return _('Other settings');
|
return _('Other settings');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,6 +67,7 @@ class OthersettingsAction extends AccountSettingsAction
|
||||||
|
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
|
// TRANS: Instructions for tab "Other" in user profile settings.
|
||||||
return _('Manage various other options.');
|
return _('Manage various other options.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,6 +107,9 @@ class OthersettingsAction extends AccountSettingsAction
|
||||||
{
|
{
|
||||||
$services[$name]=$name;
|
$services[$name]=$name;
|
||||||
if($value['freeService']){
|
if($value['freeService']){
|
||||||
|
// TRANS: Used as a suffix for free URL shorteners in a dropdown list in the tab "Other" of a
|
||||||
|
// TRANS: user's profile settings. This message has one space at the beginning. Use your
|
||||||
|
// TRANS: language's word separator here if it has one (most likely a single space).
|
||||||
$services[$name].=_(' (free service)');
|
$services[$name].=_(' (free service)');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,7 +118,9 @@ class OthersettingsAction extends AccountSettingsAction
|
||||||
asort($services);
|
asort($services);
|
||||||
|
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
|
// TRANS: Label for dropdown with URL shortener services.
|
||||||
$this->dropdown('urlshorteningservice', _('Shorten URLs with'),
|
$this->dropdown('urlshorteningservice', _('Shorten URLs with'),
|
||||||
|
// TRANS: Tooltip for for dropdown with URL shortener services.
|
||||||
$services, _('Automatic shortening service to use.'),
|
$services, _('Automatic shortening service to use.'),
|
||||||
false, $user->urlshorteningservice);
|
false, $user->urlshorteningservice);
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
|
@ -135,11 +140,13 @@ class OthersettingsAction extends AccountSettingsAction
|
||||||
_('URLs in notices longer than this will be shortened.'));
|
_('URLs in notices longer than this will be shortened.'));
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
|
// TRANS: Label for checkbox.
|
||||||
$this->checkbox('viewdesigns', _('View profile designs'),
|
$this->checkbox('viewdesigns', _('View profile designs'),
|
||||||
- $user->viewdesigns, _('Show or hide profile designs.'));
|
- $user->viewdesigns, _('Show or hide profile designs.'));
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementEnd('ul');
|
$this->elementEnd('ul');
|
||||||
$this->submit('save', _('Save'));
|
// TRANS: Button text for saving "Other settings" in profile.
|
||||||
|
$this->submit('save', _m('BUTTON','Save'));
|
||||||
$this->elementEnd('fieldset');
|
$this->elementEnd('fieldset');
|
||||||
$this->elementEnd('form');
|
$this->elementEnd('form');
|
||||||
}
|
}
|
||||||
|
@ -166,7 +173,8 @@ class OthersettingsAction extends AccountSettingsAction
|
||||||
$urlshorteningservice = $this->trimmed('urlshorteningservice');
|
$urlshorteningservice = $this->trimmed('urlshorteningservice');
|
||||||
|
|
||||||
if (!is_null($urlshorteningservice) && strlen($urlshorteningservice) > 50) {
|
if (!is_null($urlshorteningservice) && strlen($urlshorteningservice) > 50) {
|
||||||
$this->showForm(_('URL shortening service is too long (max 50 chars).'));
|
// TRANS: Form validation error for form "Other settings" in user profile.
|
||||||
|
$this->showForm(_('URL shortening service is too long (maximum 50 characters).'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,6 +207,7 @@ class OthersettingsAction extends AccountSettingsAction
|
||||||
|
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||||
|
// TRANS: Server error displayed when "Other" settings in user profile could not be updated on the server.
|
||||||
$this->serverError(_('Couldn\'t update user.'));
|
$this->serverError(_('Couldn\'t update user.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -362,7 +362,7 @@ class RecoverpasswordAction extends Action
|
||||||
$confirm = $this->trimmed('confirm');
|
$confirm = $this->trimmed('confirm');
|
||||||
|
|
||||||
if (!$newpassword || strlen($newpassword) < 6) {
|
if (!$newpassword || strlen($newpassword) < 6) {
|
||||||
$this->showPasswordForm(_('Password must be 6 chars or more.'));
|
$this->showPasswordForm(_('Password must be 6 characters or more.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($newpassword != $confirm) {
|
if ($newpassword != $confirm) {
|
||||||
|
|
|
@ -46,10 +46,8 @@ define('MEMBERS_PER_SECTION', 27);
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ShowgroupAction extends GroupDesignAction
|
class ShowgroupAction extends GroupDesignAction
|
||||||
{
|
{
|
||||||
|
|
||||||
/** page we're viewing. */
|
/** page we're viewing. */
|
||||||
var $page = null;
|
var $page = null;
|
||||||
|
|
||||||
|
@ -58,7 +56,6 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return boolean true
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function isReadOnly($args)
|
function isReadOnly($args)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
@ -69,18 +66,21 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return string page title, with page number
|
* @return string page title, with page number
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
if (!empty($this->group->fullname)) {
|
if (!empty($this->group->fullname)) {
|
||||||
|
// @todo FIXME: Needs proper i18n. Maybe use a generic method for this?
|
||||||
$base = $this->group->fullname . ' (' . $this->group->nickname . ')';
|
$base = $this->group->fullname . ' (' . $this->group->nickname . ')';
|
||||||
} else {
|
} else {
|
||||||
$base = $this->group->nickname;
|
$base = $this->group->nickname;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->page == 1) {
|
if ($this->page == 1) {
|
||||||
|
// TRANS: Page title for first group page. %s is a group name.
|
||||||
return sprintf(_('%s group'), $base);
|
return sprintf(_('%s group'), $base);
|
||||||
} else {
|
} else {
|
||||||
|
// TRANS: Page title for any but first group page.
|
||||||
|
// TRANS: %1$s is a group name, $2$s is a page number.
|
||||||
return sprintf(_('%1$s group, page %2$d'),
|
return sprintf(_('%1$s group, page %2$d'),
|
||||||
$base,
|
$base,
|
||||||
$this->page);
|
$this->page);
|
||||||
|
@ -96,7 +96,6 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return boolean success flag
|
* @return boolean success flag
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
|
@ -118,6 +117,7 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$nickname) {
|
if (!$nickname) {
|
||||||
|
// TRANS: Client error displayed if no nickname argument was given requesting a group page.
|
||||||
$this->clientError(_('No nickname.'), 404);
|
$this->clientError(_('No nickname.'), 404);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -135,6 +135,7 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
common_log(LOG_NOTICE, "Couldn't find local group for nickname '$nickname'");
|
common_log(LOG_NOTICE, "Couldn't find local group for nickname '$nickname'");
|
||||||
|
// TRANS: Client error displayed if no remote group with a given name was found requesting group page.
|
||||||
$this->clientError(_('No such group.'), 404);
|
$this->clientError(_('No such group.'), 404);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -143,6 +144,7 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
$this->group = User_group::staticGet('id', $local->group_id);
|
$this->group = User_group::staticGet('id', $local->group_id);
|
||||||
|
|
||||||
if (!$this->group) {
|
if (!$this->group) {
|
||||||
|
// TRANS: Client error displayed if no local group with a given name was found requesting group page.
|
||||||
$this->clientError(_('No such group.'), 404);
|
$this->clientError(_('No such group.'), 404);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -160,7 +162,6 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
$this->showPage();
|
$this->showPage();
|
||||||
|
@ -171,7 +172,6 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showLocalNav()
|
function showLocalNav()
|
||||||
{
|
{
|
||||||
$nav = new GroupNav($this, $this->group);
|
$nav = new GroupNav($this, $this->group);
|
||||||
|
@ -183,7 +183,6 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* Shows a group profile and a list of group notices
|
* Shows a group profile and a list of group notices
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
$this->showGroupProfile();
|
$this->showGroupProfile();
|
||||||
|
@ -195,7 +194,6 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showGroupNotices()
|
function showGroupNotices()
|
||||||
{
|
{
|
||||||
$notice = $this->group->getNotices(($this->page-1)*NOTICES_PER_PAGE,
|
$notice = $this->group->getNotices(($this->page-1)*NOTICES_PER_PAGE,
|
||||||
|
@ -218,15 +216,16 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showGroupProfile()
|
function showGroupProfile()
|
||||||
{
|
{
|
||||||
$this->elementStart('div', array('id' => 'i',
|
$this->elementStart('div', array('id' => 'i',
|
||||||
'class' => 'entity_profile vcard author'));
|
'class' => 'entity_profile vcard author'));
|
||||||
|
|
||||||
|
// TRANS: Group profile header (h2). Text hidden by default.
|
||||||
$this->element('h2', null, _('Group profile'));
|
$this->element('h2', null, _('Group profile'));
|
||||||
|
|
||||||
$this->elementStart('dl', 'entity_depiction');
|
$this->elementStart('dl', 'entity_depiction');
|
||||||
|
// TRANS: Label for group avatar (dt). Text hidden by default.
|
||||||
$this->element('dt', null, _('Avatar'));
|
$this->element('dt', null, _('Avatar'));
|
||||||
$this->elementStart('dd');
|
$this->elementStart('dd');
|
||||||
|
|
||||||
|
@ -242,6 +241,7 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
$this->elementEnd('dl');
|
$this->elementEnd('dl');
|
||||||
|
|
||||||
$this->elementStart('dl', 'entity_nickname');
|
$this->elementStart('dl', 'entity_nickname');
|
||||||
|
// TRANS: Label for group nickname (dt). Text hidden by default.
|
||||||
$this->element('dt', null, _('Nickname'));
|
$this->element('dt', null, _('Nickname'));
|
||||||
$this->elementStart('dd');
|
$this->elementStart('dd');
|
||||||
$hasFN = ($this->group->fullname) ? 'nickname url uid' : 'fn org nickname url uid';
|
$hasFN = ($this->group->fullname) ? 'nickname url uid' : 'fn org nickname url uid';
|
||||||
|
@ -253,6 +253,7 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
|
|
||||||
if ($this->group->fullname) {
|
if ($this->group->fullname) {
|
||||||
$this->elementStart('dl', 'entity_fn');
|
$this->elementStart('dl', 'entity_fn');
|
||||||
|
// TRANS: Label for full group name (dt). Text hidden by default.
|
||||||
$this->element('dt', null, _('Full name'));
|
$this->element('dt', null, _('Full name'));
|
||||||
$this->elementStart('dd');
|
$this->elementStart('dd');
|
||||||
$this->element('span', 'fn org', $this->group->fullname);
|
$this->element('span', 'fn org', $this->group->fullname);
|
||||||
|
@ -262,6 +263,7 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
|
|
||||||
if ($this->group->location) {
|
if ($this->group->location) {
|
||||||
$this->elementStart('dl', 'entity_location');
|
$this->elementStart('dl', 'entity_location');
|
||||||
|
// TRANS: Label for group location (dt). Text hidden by default.
|
||||||
$this->element('dt', null, _('Location'));
|
$this->element('dt', null, _('Location'));
|
||||||
$this->element('dd', 'label', $this->group->location);
|
$this->element('dd', 'label', $this->group->location);
|
||||||
$this->elementEnd('dl');
|
$this->elementEnd('dl');
|
||||||
|
@ -269,6 +271,7 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
|
|
||||||
if ($this->group->homepage) {
|
if ($this->group->homepage) {
|
||||||
$this->elementStart('dl', 'entity_url');
|
$this->elementStart('dl', 'entity_url');
|
||||||
|
// TRANS: Label for group URL (dt). Text hidden by default.
|
||||||
$this->element('dt', null, _('URL'));
|
$this->element('dt', null, _('URL'));
|
||||||
$this->elementStart('dd');
|
$this->elementStart('dd');
|
||||||
$this->element('a', array('href' => $this->group->homepage,
|
$this->element('a', array('href' => $this->group->homepage,
|
||||||
|
@ -280,6 +283,7 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
|
|
||||||
if ($this->group->description) {
|
if ($this->group->description) {
|
||||||
$this->elementStart('dl', 'entity_note');
|
$this->elementStart('dl', 'entity_note');
|
||||||
|
// TRANS: Label for group description or group note (dt). Text hidden by default.
|
||||||
$this->element('dt', null, _('Note'));
|
$this->element('dt', null, _('Note'));
|
||||||
$this->element('dd', 'note', $this->group->description);
|
$this->element('dd', 'note', $this->group->description);
|
||||||
$this->elementEnd('dl');
|
$this->elementEnd('dl');
|
||||||
|
@ -290,6 +294,7 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
|
|
||||||
if (!empty($aliases)) {
|
if (!empty($aliases)) {
|
||||||
$this->elementStart('dl', 'entity_aliases');
|
$this->elementStart('dl', 'entity_aliases');
|
||||||
|
// TRANS: Label for group aliases (dt). Text hidden by default.
|
||||||
$this->element('dt', null, _('Aliases'));
|
$this->element('dt', null, _('Aliases'));
|
||||||
$this->element('dd', 'aliases', implode(' ', $aliases));
|
$this->element('dd', 'aliases', implode(' ', $aliases));
|
||||||
$this->elementEnd('dl');
|
$this->elementEnd('dl');
|
||||||
|
@ -300,6 +305,7 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
|
|
||||||
$cur = common_current_user();
|
$cur = common_current_user();
|
||||||
$this->elementStart('div', 'entity_actions');
|
$this->elementStart('div', 'entity_actions');
|
||||||
|
// TRANS: Group actions header (h2). Text hidden by default.
|
||||||
$this->element('h2', null, _('Group actions'));
|
$this->element('h2', null, _('Group actions'));
|
||||||
$this->elementStart('ul');
|
$this->elementStart('ul');
|
||||||
$this->elementStart('li', 'entity_subscribe');
|
$this->elementStart('li', 'entity_subscribe');
|
||||||
|
@ -331,7 +337,6 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getFeeds()
|
function getFeeds()
|
||||||
{
|
{
|
||||||
$url =
|
$url =
|
||||||
|
@ -341,23 +346,27 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
return array(new Feed(Feed::RSS1,
|
return array(new Feed(Feed::RSS1,
|
||||||
common_local_url('grouprss',
|
common_local_url('grouprss',
|
||||||
array('nickname' => $this->group->nickname)),
|
array('nickname' => $this->group->nickname)),
|
||||||
|
// TRANS: Tooltip for feed link. %s is a group nickname.
|
||||||
sprintf(_('Notice feed for %s group (RSS 1.0)'),
|
sprintf(_('Notice feed for %s group (RSS 1.0)'),
|
||||||
$this->group->nickname)),
|
$this->group->nickname)),
|
||||||
new Feed(Feed::RSS2,
|
new Feed(Feed::RSS2,
|
||||||
common_local_url('ApiTimelineGroup',
|
common_local_url('ApiTimelineGroup',
|
||||||
array('format' => 'rss',
|
array('format' => 'rss',
|
||||||
'id' => $this->group->id)),
|
'id' => $this->group->id)),
|
||||||
|
// TRANS: Tooltip for feed link. %s is a group nickname.
|
||||||
sprintf(_('Notice feed for %s group (RSS 2.0)'),
|
sprintf(_('Notice feed for %s group (RSS 2.0)'),
|
||||||
$this->group->nickname)),
|
$this->group->nickname)),
|
||||||
new Feed(Feed::ATOM,
|
new Feed(Feed::ATOM,
|
||||||
common_local_url('ApiTimelineGroup',
|
common_local_url('ApiTimelineGroup',
|
||||||
array('format' => 'atom',
|
array('format' => 'atom',
|
||||||
'id' => $this->group->id)),
|
'id' => $this->group->id)),
|
||||||
|
// TRANS: Tooltip for feed link. %s is a group nickname.
|
||||||
sprintf(_('Notice feed for %s group (Atom)'),
|
sprintf(_('Notice feed for %s group (Atom)'),
|
||||||
$this->group->nickname)),
|
$this->group->nickname)),
|
||||||
new Feed(Feed::FOAF,
|
new Feed(Feed::FOAF,
|
||||||
common_local_url('foafgroup',
|
common_local_url('foafgroup',
|
||||||
array('nickname' => $this->group->nickname)),
|
array('nickname' => $this->group->nickname)),
|
||||||
|
// TRANS: Tooltip for feed link. %s is a group nickname.
|
||||||
sprintf(_('FOAF for %s group'),
|
sprintf(_('FOAF for %s group'),
|
||||||
$this->group->nickname)));
|
$this->group->nickname)));
|
||||||
}
|
}
|
||||||
|
@ -367,7 +376,6 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showSections()
|
function showSections()
|
||||||
{
|
{
|
||||||
$this->showMembers();
|
$this->showMembers();
|
||||||
|
@ -382,7 +390,6 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showMembers()
|
function showMembers()
|
||||||
{
|
{
|
||||||
$member = $this->group->getMembers(0, MEMBERS_PER_SECTION);
|
$member = $this->group->getMembers(0, MEMBERS_PER_SECTION);
|
||||||
|
@ -396,17 +403,22 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
|
|
||||||
if (Event::handle('StartShowGroupMembersMiniList', array($this))) {
|
if (Event::handle('StartShowGroupMembersMiniList', array($this))) {
|
||||||
|
|
||||||
|
// TRANS: Header for mini list of group members on a group page (h2).
|
||||||
$this->element('h2', null, _('Members'));
|
$this->element('h2', null, _('Members'));
|
||||||
|
|
||||||
$gmml = new GroupMembersMiniList($member, $this);
|
$gmml = new GroupMembersMiniList($member, $this);
|
||||||
$cnt = $gmml->show();
|
$cnt = $gmml->show();
|
||||||
if ($cnt == 0) {
|
if ($cnt == 0) {
|
||||||
|
// TRANS: Description for mini list of group members on a group page when the group has no members.
|
||||||
$this->element('p', null, _('(None)'));
|
$this->element('p', null, _('(None)'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @todo FIXME: Should be shown if a group has more than 27 members, but I do not see it displayed at
|
||||||
|
// for example http://identi.ca/group/statusnet. Broken?
|
||||||
if ($cnt > MEMBERS_PER_SECTION) {
|
if ($cnt > MEMBERS_PER_SECTION) {
|
||||||
$this->element('a', array('href' => common_local_url('groupmembers',
|
$this->element('a', array('href' => common_local_url('groupmembers',
|
||||||
array('nickname' => $this->group->nickname))),
|
array('nickname' => $this->group->nickname))),
|
||||||
|
// TRANS: Link to all group members from mini list of group members if group has more than n members.
|
||||||
_('All members'));
|
_('All members'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -421,7 +433,6 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showAdmins()
|
function showAdmins()
|
||||||
{
|
{
|
||||||
$adminSection = new GroupAdminSection($this, $this->group);
|
$adminSection = new GroupAdminSection($this, $this->group);
|
||||||
|
@ -433,22 +444,26 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showStatistics()
|
function showStatistics()
|
||||||
{
|
{
|
||||||
$this->elementStart('div', array('id' => 'entity_statistics',
|
$this->elementStart('div', array('id' => 'entity_statistics',
|
||||||
'class' => 'section'));
|
'class' => 'section'));
|
||||||
|
|
||||||
|
// TRANS: Header for group statistics on a group page (h2).
|
||||||
$this->element('h2', null, _('Statistics'));
|
$this->element('h2', null, _('Statistics'));
|
||||||
|
|
||||||
$this->elementStart('dl', 'entity_created');
|
$this->elementStart('dl', 'entity_created');
|
||||||
$this->element('dt', null, _('Created'));
|
// @todo FIXME: i18n issue. This label gets a colon added from somewhere. Should be part of the message.
|
||||||
|
// TRANS: Label for creation date in statistics on group page.
|
||||||
|
$this->element('dt', null, _m('LABEL','Created'));
|
||||||
$this->element('dd', null, date('j M Y',
|
$this->element('dd', null, date('j M Y',
|
||||||
strtotime($this->group->created)));
|
strtotime($this->group->created)));
|
||||||
$this->elementEnd('dl');
|
$this->elementEnd('dl');
|
||||||
|
|
||||||
$this->elementStart('dl', 'entity_members');
|
$this->elementStart('dl', 'entity_members');
|
||||||
$this->element('dt', null, _('Members'));
|
// @todo FIXME: i18n issue. This label gets a colon added from somewhere. Should be part of the message.
|
||||||
|
// TRANS: Label for member count in statistics on group page.
|
||||||
|
$this->element('dt', null, _m('LABEL','Members'));
|
||||||
$this->element('dd', null, $this->group->getMemberCount());
|
$this->element('dd', null, $this->group->getMemberCount());
|
||||||
$this->elementEnd('dl');
|
$this->elementEnd('dl');
|
||||||
|
|
||||||
|
@ -458,12 +473,21 @@ class ShowgroupAction extends GroupDesignAction
|
||||||
function showAnonymousMessage()
|
function showAnonymousMessage()
|
||||||
{
|
{
|
||||||
if (!(common_config('site','closed') || common_config('site','inviteonly'))) {
|
if (!(common_config('site','closed') || common_config('site','inviteonly'))) {
|
||||||
|
// @todo FIXME: use group full name here if available instead of (uglier) primary alias.
|
||||||
|
// TRANS: Notice on group pages for anonymous users for StatusNet sites that accept new registrations.
|
||||||
|
// TRANS: **%s** is the group alias, %%%%site.name%%%% is the site name,
|
||||||
|
// TRANS: %%%%action.register%%%% is the URL for registration, %%%%doc.help%%%% is a URL to help.
|
||||||
|
// TRANS: This message contains Markdown links. Ensure they are formatted correctly: [Description](link).
|
||||||
$m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
|
$m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
|
||||||
'based on the Free Software [StatusNet](http://status.net/) tool. Its members share ' .
|
'based on the Free Software [StatusNet](http://status.net/) tool. Its members share ' .
|
||||||
'short messages about their life and interests. '.
|
'short messages about their life and interests. '.
|
||||||
'[Join now](%%%%action.register%%%%) to become part of this group and many more! ([Read more](%%%%doc.help%%%%))'),
|
'[Join now](%%%%action.register%%%%) to become part of this group and many more! ([Read more](%%%%doc.help%%%%))'),
|
||||||
$this->group->nickname);
|
$this->group->nickname);
|
||||||
} else {
|
} else {
|
||||||
|
// @todo FIXME: use group full name here if available instead of (uglier) primary alias.
|
||||||
|
// TRANS: Notice on group pages for anonymous users for StatusNet sites that accept no new registrations.
|
||||||
|
// TRANS: **%s** is the group alias, %%%%site.name%%%% is the site name,
|
||||||
|
// TRANS: This message contains Markdown links. Ensure they are formatted correctly: [Description](link).
|
||||||
$m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
|
$m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
|
||||||
'based on the Free Software [StatusNet](http://status.net/) tool. Its members share ' .
|
'based on the Free Software [StatusNet](http://status.net/) tool. Its members share ' .
|
||||||
'short messages about their life and interests. '),
|
'short messages about their life and interests. '),
|
||||||
|
@ -492,6 +516,7 @@ class GroupAdminSection extends ProfileSection
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
|
// TRANS: Header for list of group administrators on a group page (h2).
|
||||||
return _('Admins');
|
return _('Admins');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -527,4 +552,3 @@ class GroupMembersMiniListItem extends ProfileMiniListItem
|
||||||
return $aAttrs;
|
return $aAttrs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once INSTALLDIR.'/lib/mailbox.php';
|
require_once INSTALLDIR.'/lib/mailbox.php';
|
||||||
|
@ -36,26 +36,24 @@ require_once INSTALLDIR.'/lib/mailbox.php';
|
||||||
* Show a single message
|
* Show a single message
|
||||||
*
|
*
|
||||||
* // XXX: It is totally weird how this works!
|
* // XXX: It is totally weird how this works!
|
||||||
*
|
*
|
||||||
* @category Personal
|
* @category Personal
|
||||||
* @package StatusNet
|
* @package StatusNet
|
||||||
* @author Evan Prodromou <evan@status.net>
|
* @author Evan Prodromou <evan@status.net>
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ShowmessageAction extends MailboxAction
|
class ShowmessageAction extends MailboxAction
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Message object to show
|
* Message object to show
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var $message = null;
|
var $message = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The current user
|
* The current user
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var $user = null;
|
var $user = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -67,17 +65,17 @@ class ShowmessageAction extends MailboxAction
|
||||||
*
|
*
|
||||||
* @return success flag
|
* @return success flag
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
|
|
||||||
$this->page = 1;
|
$this->page = 1;
|
||||||
|
|
||||||
$id = $this->trimmed('message');
|
$id = $this->trimmed('message');
|
||||||
$this->message = Message::staticGet('id', $id);
|
$this->message = Message::staticGet('id', $id);
|
||||||
|
|
||||||
if (!$this->message) {
|
if (!$this->message) {
|
||||||
|
// TRANS: Client error displayed requesting a single message that does not exist.
|
||||||
$this->clientError(_('No such message.'), 404);
|
$this->clientError(_('No such message.'), 404);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -90,40 +88,47 @@ class ShowmessageAction extends MailboxAction
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
Action::handle($args);
|
Action::handle($args);
|
||||||
|
|
||||||
if ($this->user && ($this->user->id == $this->message->from_profile ||
|
if ($this->user && ($this->user->id == $this->message->from_profile ||
|
||||||
$this->user->id == $this->message->to_profile)) {
|
$this->user->id == $this->message->to_profile)) {
|
||||||
$this->showPage();
|
$this->showPage();
|
||||||
} else {
|
} else {
|
||||||
|
// TRANS: Client error displayed requesting a single direct message the requesting user was not a party in.
|
||||||
$this->clientError(_('Only the sender and recipient ' .
|
$this->clientError(_('Only the sender and recipient ' .
|
||||||
'may read this message.'), 403);
|
'may read this message.'), 403);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
if ($this->user->id == $this->message->from_profile) {
|
if ($this->user->id == $this->message->from_profile) {
|
||||||
$to = $this->message->getTo();
|
$to = $this->message->getTo();
|
||||||
return sprintf(_("Message to %1\$s on %2\$s"),
|
// @todo FIXME: Might be nice if the timestamp could be localised.
|
||||||
|
// TRANS: Page title for single direct message display when viewing user is the sender.
|
||||||
|
// TRANS: %1$s is the addressed user's nickname, $2$s is a timestamp.
|
||||||
|
return sprintf(_('Message to %1$s on %2$s'),
|
||||||
$to->nickname,
|
$to->nickname,
|
||||||
common_exact_date($this->message->created));
|
common_exact_date($this->message->created));
|
||||||
} else if ($this->user->id == $this->message->to_profile) {
|
} else if ($this->user->id == $this->message->to_profile) {
|
||||||
$from = $this->message->getFrom();
|
$from = $this->message->getFrom();
|
||||||
return sprintf(_("Message from %1\$s on %2\$s"),
|
// @todo FIXME: Might be nice if the timestamp could be localised.
|
||||||
|
// TRANS: Page title for single message display.
|
||||||
|
// TRANS: %1$s is the sending user's nickname, $2$s is a timestamp.
|
||||||
|
return sprintf(_('Message from %1$s on %2$s'),
|
||||||
$from->nickname,
|
$from->nickname,
|
||||||
common_exact_date($this->message->created));
|
common_exact_date($this->message->created));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMessages()
|
function getMessages()
|
||||||
{
|
{
|
||||||
$message = new Message();
|
$message = new Message();
|
||||||
$message->id = $this->message->id;
|
$message->id = $this->message->id;
|
||||||
$message->find();
|
$message->find();
|
||||||
return $message;
|
return $message;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMessageProfile()
|
function getMessageProfile()
|
||||||
{
|
{
|
||||||
if ($this->user->id == $this->message->from_profile) {
|
if ($this->user->id == $this->message->from_profile) {
|
||||||
|
@ -135,23 +140,21 @@ class ShowmessageAction extends MailboxAction
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Don't show local navigation
|
* Don't show local navigation
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showLocalNavBlock()
|
function showLocalNavBlock()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Don't show page notice
|
* Don't show page notice
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showPageNoticeBlock()
|
function showPageNoticeBlock()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -161,17 +164,15 @@ class ShowmessageAction extends MailboxAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
function showAside()
|
||||||
function showAside()
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Don't show any instructions
|
* Don't show any instructions
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
return '';
|
return '';
|
||||||
|
|
|
@ -63,21 +63,24 @@ class ShowstreamAction extends ProfileAction
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
if (!empty($this->profile->fullname)) {
|
$base = $this->profile->getFancyName();
|
||||||
$base = $this->profile->fullname . ' (' . $this->user->nickname . ') ';
|
|
||||||
} else {
|
|
||||||
$base = $this->user->nickname;
|
|
||||||
}
|
|
||||||
if (!empty($this->tag)) {
|
if (!empty($this->tag)) {
|
||||||
$base .= sprintf(_(' tagged %s'), $this->tag);
|
if ($this->page == 1) {
|
||||||
}
|
// TRANS: Page title showing tagged notices in one user's stream. Param 1 is the username, 2 is the hash tag.
|
||||||
|
return sprintf(_('%1$s tagged %2$s'), $base, $this->tag);
|
||||||
if ($this->page == 1) {
|
} else {
|
||||||
return $base;
|
// TRANS: Page title showing tagged notices in one user's stream. Param 1 is the username, 2 is the hash tag, 3 is the page number.
|
||||||
|
return sprintf(_('%1$s tagged %2$s, page %3$d'), $base, $this->tag, $this->page);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return sprintf(_('%1$s, page %2$d'),
|
if ($this->page == 1) {
|
||||||
$base,
|
return $base;
|
||||||
$this->page);
|
} else {
|
||||||
|
// TRANS: Extended page title showing tagged notices in one user's stream. Param 1 is the username, param 2 is the page number.
|
||||||
|
return sprintf(_('%1$s, page %2$d'),
|
||||||
|
$base,
|
||||||
|
$this->page);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ require_once INSTALLDIR.'/extlib/htmLawed/htmLawed.php';
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class SitenoticeadminpanelAction extends AdminPanelAction
|
class SitenoticeadminpanelAction extends AdminPanelAction
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -50,9 +49,9 @@ class SitenoticeadminpanelAction extends AdminPanelAction
|
||||||
*
|
*
|
||||||
* @return string page title
|
* @return string page title
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
|
// TRANS: Page title for site-wide notice tab in admin panel.
|
||||||
return _('Site Notice');
|
return _('Site Notice');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,9 +60,9 @@ class SitenoticeadminpanelAction extends AdminPanelAction
|
||||||
*
|
*
|
||||||
* @return string instructions
|
* @return string instructions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
|
// TRANS: Instructions for site-wide notice tab in admin panel.
|
||||||
return _('Edit site-wide message');
|
return _('Edit site-wide message');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +71,6 @@ class SitenoticeadminpanelAction extends AdminPanelAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showForm()
|
function showForm()
|
||||||
{
|
{
|
||||||
$form = new SiteNoticeAdminPanelForm($this);
|
$form = new SiteNoticeAdminPanelForm($this);
|
||||||
|
@ -85,7 +83,6 @@ class SitenoticeadminpanelAction extends AdminPanelAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function saveSettings()
|
function saveSettings()
|
||||||
{
|
{
|
||||||
$siteNotice = $this->trimmed('site-notice');
|
$siteNotice = $this->trimmed('site-notice');
|
||||||
|
@ -100,6 +97,7 @@ class SitenoticeadminpanelAction extends AdminPanelAction
|
||||||
$result = Config::save('site', 'notice', $siteNotice);
|
$result = Config::save('site', 'notice', $siteNotice);
|
||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
|
// TRANS: Server error displayed when saving a site-wide notice was impossible.
|
||||||
$this->ServerError(_("Unable to save site notice."));
|
$this->ServerError(_("Unable to save site notice."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,7 +108,8 @@ class SitenoticeadminpanelAction extends AdminPanelAction
|
||||||
|
|
||||||
if (mb_strlen($siteNotice) > 255) {
|
if (mb_strlen($siteNotice) > 255) {
|
||||||
$this->clientError(
|
$this->clientError(
|
||||||
_('Max length for the site-wide notice is 255 chars.')
|
// TRANS: Client error displayed when a site-wide notice was longer than allowed.
|
||||||
|
_('Maximum length for the site-wide notice is 255 characters.')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,9 +172,11 @@ class SiteNoticeAdminPanelForm extends AdminForm
|
||||||
$this->out->elementStart('li');
|
$this->out->elementStart('li');
|
||||||
$this->out->textarea(
|
$this->out->textarea(
|
||||||
'site-notice',
|
'site-notice',
|
||||||
|
// TRANS: Label for site-wide notice text field in admin panel.
|
||||||
_('Site notice text'),
|
_('Site notice text'),
|
||||||
common_config('site', 'notice'),
|
common_config('site', 'notice'),
|
||||||
_('Site-wide notice text (255 chars max; HTML okay)')
|
// TRANS: Tooltip for site-wide notice text field in admin panel.
|
||||||
|
_('Site-wide notice text (255 characters maximum; HTML allowed)')
|
||||||
);
|
);
|
||||||
$this->out->elementEnd('li');
|
$this->out->elementEnd('li');
|
||||||
|
|
||||||
|
@ -192,9 +193,11 @@ class SiteNoticeAdminPanelForm extends AdminForm
|
||||||
{
|
{
|
||||||
$this->out->submit(
|
$this->out->submit(
|
||||||
'submit',
|
'submit',
|
||||||
_('Save'),
|
// TRANS: Button text for saving site notice in admin panel.
|
||||||
|
_m('BUTTON','Save'),
|
||||||
'submit',
|
'submit',
|
||||||
null,
|
null,
|
||||||
|
// TRANS: Title for button to save site notice in admin panel.
|
||||||
_('Save site notice')
|
_('Save site notice')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
|
// @todo FIXME: Documentation needed.
|
||||||
class SubeditAction extends Action
|
class SubeditAction extends Action
|
||||||
{
|
{
|
||||||
var $profile = null;
|
var $profile = null;
|
||||||
|
@ -28,6 +29,7 @@ class SubeditAction extends Action
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
|
|
||||||
if (!common_logged_in()) {
|
if (!common_logged_in()) {
|
||||||
|
// TRANS: Client error displayed trying a change a subscription while not logged in.
|
||||||
$this->clientError(_('Not logged in.'));
|
$this->clientError(_('Not logged in.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -43,6 +45,7 @@ class SubeditAction extends Action
|
||||||
$id = $this->trimmed('profile');
|
$id = $this->trimmed('profile');
|
||||||
|
|
||||||
if (!$id) {
|
if (!$id) {
|
||||||
|
// TRANS: Client error displayed trying a change a subscription without providing a profile.
|
||||||
$this->clientError(_('No profile specified.'));
|
$this->clientError(_('No profile specified.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -50,6 +53,7 @@ class SubeditAction extends Action
|
||||||
$this->profile = Profile::staticGet('id', $id);
|
$this->profile = Profile::staticGet('id', $id);
|
||||||
|
|
||||||
if (!$this->profile) {
|
if (!$this->profile) {
|
||||||
|
// TRANS: Client error displayed trying a change a subscription for a non-existant profile ID.
|
||||||
$this->clientError(_('No profile with that ID.'));
|
$this->clientError(_('No profile with that ID.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -67,6 +71,7 @@ class SubeditAction extends Action
|
||||||
'subscribed' => $this->profile->id));
|
'subscribed' => $this->profile->id));
|
||||||
|
|
||||||
if (!$sub) {
|
if (!$sub) {
|
||||||
|
// TRANS: Client error displayed trying a change a subscription for a non-subscribed profile.
|
||||||
$this->clientError(_('You are not subscribed to that profile.'));
|
$this->clientError(_('You are not subscribed to that profile.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -80,6 +85,7 @@ class SubeditAction extends Action
|
||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log_db_error($sub, 'UPDATE', __FILE__);
|
common_log_db_error($sub, 'UPDATE', __FILE__);
|
||||||
|
// TRANS: Server error displayed when updating a subscription fails with a database error.
|
||||||
$this->serverError(_('Could not save subscription.'));
|
$this->serverError(_('Could not save subscription.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,6 @@ if (!defined('STATUSNET')) {
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class UseradminpanelAction extends AdminPanelAction
|
class UseradminpanelAction extends AdminPanelAction
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -53,7 +52,6 @@ class UseradminpanelAction extends AdminPanelAction
|
||||||
*
|
*
|
||||||
* @return string page title
|
* @return string page title
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
// TRANS: User admin panel title
|
// TRANS: User admin panel title
|
||||||
|
@ -65,9 +63,9 @@ class UseradminpanelAction extends AdminPanelAction
|
||||||
*
|
*
|
||||||
* @return string instructions
|
* @return string instructions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
|
// TRANS: Instruction for user admin panel.
|
||||||
return _('User settings for this StatusNet site');
|
return _('User settings for this StatusNet site');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +74,6 @@ class UseradminpanelAction extends AdminPanelAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showForm()
|
function showForm()
|
||||||
{
|
{
|
||||||
$form = new UserAdminPanelForm($this);
|
$form = new UserAdminPanelForm($this);
|
||||||
|
@ -89,7 +86,6 @@ class UseradminpanelAction extends AdminPanelAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function saveSettings()
|
function saveSettings()
|
||||||
{
|
{
|
||||||
static $settings = array(
|
static $settings = array(
|
||||||
|
@ -147,13 +143,15 @@ class UseradminpanelAction extends AdminPanelAction
|
||||||
// Validate biolimit
|
// Validate biolimit
|
||||||
|
|
||||||
if (!Validate::number($values['profile']['biolimit'])) {
|
if (!Validate::number($values['profile']['biolimit'])) {
|
||||||
$this->clientError(_("Invalid bio limit. Must be numeric."));
|
// TRANS: Form validation error in user admin panel when a non-numeric character limit was set.
|
||||||
|
$this->clientError(_('Invalid bio limit. Must be numeric.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate welcome text
|
// Validate welcome text
|
||||||
|
|
||||||
if (mb_strlen($values['newuser']['welcome']) > 255) {
|
if (mb_strlen($values['newuser']['welcome']) > 255) {
|
||||||
$this->clientError(_("Invalid welcome text. Max length is 255 characters."));
|
// TRANS: Form validation error in user admin panel when welcome text is too long.
|
||||||
|
$this->clientError(_('Invalid welcome text. Maximum length is 255 characters.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate default subscription
|
// Validate default subscription
|
||||||
|
@ -163,7 +161,9 @@ class UseradminpanelAction extends AdminPanelAction
|
||||||
if (empty($defuser)) {
|
if (empty($defuser)) {
|
||||||
$this->clientError(
|
$this->clientError(
|
||||||
sprintf(
|
sprintf(
|
||||||
_('Invalid default subscripton: \'%1$s\' is not user.'),
|
// TRANS: Client error displayed when trying to set a non-existing user as default subscription for new
|
||||||
|
// TRANS: users in user admin panel. %1$s is the invalid nickname.
|
||||||
|
_('Invalid default subscripton: \'%1$s\' is not a user.'),
|
||||||
$values['newuser']['default']
|
$values['newuser']['default']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -179,7 +179,6 @@ class UserAdminPanelForm extends AdminForm
|
||||||
*
|
*
|
||||||
* @return int ID of the form
|
* @return int ID of the form
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function id()
|
function id()
|
||||||
{
|
{
|
||||||
return 'useradminpanel';
|
return 'useradminpanel';
|
||||||
|
@ -190,7 +189,6 @@ class UserAdminPanelForm extends AdminForm
|
||||||
*
|
*
|
||||||
* @return string class of the form
|
* @return string class of the form
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formClass()
|
function formClass()
|
||||||
{
|
{
|
||||||
return 'form_settings';
|
return 'form_settings';
|
||||||
|
@ -201,7 +199,6 @@ class UserAdminPanelForm extends AdminForm
|
||||||
*
|
*
|
||||||
* @return string URL of the action
|
* @return string URL of the action
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function action()
|
function action()
|
||||||
{
|
{
|
||||||
return common_local_url('useradminpanel');
|
return common_local_url('useradminpanel');
|
||||||
|
@ -212,7 +209,6 @@ class UserAdminPanelForm extends AdminForm
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formData()
|
function formData()
|
||||||
{
|
{
|
||||||
$this->out->elementStart('fieldset', array('id' => 'settings_user-profile'));
|
$this->out->elementStart('fieldset', array('id' => 'settings_user-profile'));
|
||||||
|
@ -220,7 +216,9 @@ class UserAdminPanelForm extends AdminForm
|
||||||
$this->out->elementStart('ul', 'form_data');
|
$this->out->elementStart('ul', 'form_data');
|
||||||
|
|
||||||
$this->li();
|
$this->li();
|
||||||
|
// TRANS: Field label in user admin panel for setting the character limit for the bio field.
|
||||||
$this->input('biolimit', _('Bio Limit'),
|
$this->input('biolimit', _('Bio Limit'),
|
||||||
|
// TRANS: Tooltip in user admin panel for setting the character limit for the bio field.
|
||||||
_('Maximum length of a profile bio in characters.'),
|
_('Maximum length of a profile bio in characters.'),
|
||||||
'profile');
|
'profile');
|
||||||
$this->unli();
|
$this->unli();
|
||||||
|
@ -229,17 +227,22 @@ class UserAdminPanelForm extends AdminForm
|
||||||
$this->out->elementEnd('fieldset');
|
$this->out->elementEnd('fieldset');
|
||||||
|
|
||||||
$this->out->elementStart('fieldset', array('id' => 'settings_user-newusers'));
|
$this->out->elementStart('fieldset', array('id' => 'settings_user-newusers'));
|
||||||
|
// TRANS: Form legend in user admin panel.
|
||||||
$this->out->element('legend', null, _('New users'));
|
$this->out->element('legend', null, _('New users'));
|
||||||
$this->out->elementStart('ul', 'form_data');
|
$this->out->elementStart('ul', 'form_data');
|
||||||
|
|
||||||
$this->li();
|
$this->li();
|
||||||
|
// TRANS: Field label in user admin panel for setting new user welcome text.
|
||||||
$this->input('welcome', _('New user welcome'),
|
$this->input('welcome', _('New user welcome'),
|
||||||
_('Welcome text for new users (Max 255 chars).'),
|
// TRANS: Tooltip in user admin panel for setting new user welcome text.
|
||||||
|
_('Welcome text for new users (maximum 255 characters).'),
|
||||||
'newuser');
|
'newuser');
|
||||||
$this->unli();
|
$this->unli();
|
||||||
|
|
||||||
$this->li();
|
$this->li();
|
||||||
|
// TRANS: Field label in user admin panel for setting default subscription for new users.
|
||||||
$this->input('default', _('Default subscription'),
|
$this->input('default', _('Default subscription'),
|
||||||
|
// TRANS: Tooltip in user admin panel for setting default subscription for new users.
|
||||||
_('Automatically subscribe new users to this user.'),
|
_('Automatically subscribe new users to this user.'),
|
||||||
'newuser');
|
'newuser');
|
||||||
$this->unli();
|
$this->unli();
|
||||||
|
@ -249,21 +252,21 @@ class UserAdminPanelForm extends AdminForm
|
||||||
$this->out->elementEnd('fieldset');
|
$this->out->elementEnd('fieldset');
|
||||||
|
|
||||||
$this->out->elementStart('fieldset', array('id' => 'settings_user-invitations'));
|
$this->out->elementStart('fieldset', array('id' => 'settings_user-invitations'));
|
||||||
|
// TRANS: Form legend in user admin panel.
|
||||||
$this->out->element('legend', null, _('Invitations'));
|
$this->out->element('legend', null, _('Invitations'));
|
||||||
$this->out->elementStart('ul', 'form_data');
|
$this->out->elementStart('ul', 'form_data');
|
||||||
|
|
||||||
$this->li();
|
$this->li();
|
||||||
|
|
||||||
|
// TRANS: Field label for checkbox in user admin panel for allowing users to invite friend using site e-mail.
|
||||||
$this->out->checkbox('invite-enabled', _('Invitations enabled'),
|
$this->out->checkbox('invite-enabled', _('Invitations enabled'),
|
||||||
(bool) $this->value('enabled', 'invite'),
|
(bool) $this->value('enabled', 'invite'),
|
||||||
|
// TRANS: Tooltip for checkbox in user admin panel for allowing users to invite friend using site e-mail.
|
||||||
_('Whether to allow users to invite new users.'));
|
_('Whether to allow users to invite new users.'));
|
||||||
$this->unli();
|
$this->unli();
|
||||||
|
|
||||||
$this->out->elementEnd('ul');
|
$this->out->elementEnd('ul');
|
||||||
$this->out->elementEnd('fieldset');
|
$this->out->elementEnd('fieldset');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -278,7 +281,6 @@ class UserAdminPanelForm extends AdminForm
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function input($setting, $title, $instructions, $section='site')
|
function input($setting, $title, $instructions, $section='site')
|
||||||
{
|
{
|
||||||
$this->out->input("$section-$setting", $title, $this->value($setting, $section), $instructions);
|
$this->out->input("$section-$setting", $title, $this->value($setting, $section), $instructions);
|
||||||
|
@ -289,9 +291,14 @@ class UserAdminPanelForm extends AdminForm
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formActions()
|
function formActions()
|
||||||
{
|
{
|
||||||
$this->out->submit('submit', _('Save'), 'submit', null, _('Save user settings'));
|
$this->out->submit('submit',
|
||||||
|
// TRANS: Button text to save user settings in user admin panel.
|
||||||
|
_m('BUTTON','Save'),
|
||||||
|
'submit',
|
||||||
|
null,
|
||||||
|
// TRANS: Title for button to save user settings in user admin panel.
|
||||||
|
_('Save user settings'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,11 +141,32 @@ class Profile extends Memcached_DataObject
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets either the full name (if filled) or the nickname.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
function getBestName()
|
function getBestName()
|
||||||
{
|
{
|
||||||
return ($this->fullname) ? $this->fullname : $this->nickname;
|
return ($this->fullname) ? $this->fullname : $this->nickname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the full name (if filled) with nickname as a parenthetical, or the nickname alone
|
||||||
|
* if no fullname is provided.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function getFancyName()
|
||||||
|
{
|
||||||
|
if ($this->fullname) {
|
||||||
|
// TRANS: Full name of a profile or group followed by nickname in parens
|
||||||
|
return sprintf(_('%1$s (%2$s)'), $this->fullname, $this->nickname);
|
||||||
|
} else {
|
||||||
|
return $this->nickname;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the most recent notice posted by this user, if any.
|
* Get the most recent notice posted by this user, if any.
|
||||||
*
|
*
|
||||||
|
|
11
js/util.js
11
js/util.js
|
@ -56,6 +56,15 @@ var SN = { // StatusNet
|
||||||
NoticeDataGeoCookie: 'NoticeDataGeo',
|
NoticeDataGeoCookie: 'NoticeDataGeo',
|
||||||
NoticeDataGeoSelected: 'notice_data-geo_selected',
|
NoticeDataGeoSelected: 'notice_data-geo_selected',
|
||||||
StatusNetInstance:'StatusNetInstance'
|
StatusNetInstance:'StatusNetInstance'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
messages: {},
|
||||||
|
msg: function(key) {
|
||||||
|
if (typeof SN.messages[key] == "undefined") {
|
||||||
|
return '[' + key + ']';
|
||||||
|
} else {
|
||||||
|
return SN.messages[key];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -416,7 +425,7 @@ var SN = { // StatusNet
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
}).attr('title', SN.msg('showmore_tooltip'));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$.fn.jOverlay.options = {
|
$.fn.jOverlay.options = {
|
||||||
|
|
|
@ -283,6 +283,7 @@ class Action extends HTMLOutputter // lawsuit
|
||||||
if (Event::handle('StartShowStatusNetScripts', array($this)) &&
|
if (Event::handle('StartShowStatusNetScripts', array($this)) &&
|
||||||
Event::handle('StartShowLaconicaScripts', array($this))) {
|
Event::handle('StartShowLaconicaScripts', array($this))) {
|
||||||
$this->script('util.js');
|
$this->script('util.js');
|
||||||
|
$this->showScriptMessages();
|
||||||
// Frame-busting code to avoid clickjacking attacks.
|
// Frame-busting code to avoid clickjacking attacks.
|
||||||
$this->inlineScript('if (window.top !== window.self) { window.top.location.href = window.self.location.href; }');
|
$this->inlineScript('if (window.top !== window.self) { window.top.location.href = window.self.location.href; }');
|
||||||
Event::handle('EndShowStatusNetScripts', array($this));
|
Event::handle('EndShowStatusNetScripts', array($this));
|
||||||
|
@ -292,6 +293,54 @@ class Action extends HTMLOutputter // lawsuit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Exports a map of localized text strings to JavaScript code.
|
||||||
|
*
|
||||||
|
* Plugins can add to what's exported by hooking the StartScriptMessages or EndScriptMessages
|
||||||
|
* events and appending to the array. Try to avoid adding strings that won't be used, as
|
||||||
|
* they'll be added to HTML output.
|
||||||
|
*/
|
||||||
|
function showScriptMessages()
|
||||||
|
{
|
||||||
|
$messages = array();
|
||||||
|
if (Event::handle('StartScriptMessages', array($this, &$messages))) {
|
||||||
|
// Common messages needed for timeline views etc...
|
||||||
|
|
||||||
|
// TRANS: Localized tooltip for '...' expansion button on overlong remote messages.
|
||||||
|
$messages['showmore_tooltip'] = _m('TOOLTIP', 'Show more');
|
||||||
|
|
||||||
|
$messages = array_merge($messages, $this->getScriptMessages());
|
||||||
|
}
|
||||||
|
Event::handle('EndScriptMessages', array($this, &$messages));
|
||||||
|
if ($messages) {
|
||||||
|
$this->inlineScript('SN.messages=' . json_encode($messages));
|
||||||
|
}
|
||||||
|
return $messages;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the action will need localizable text strings, export them here like so:
|
||||||
|
*
|
||||||
|
* return array('pool_deepend' => _('Deep end'),
|
||||||
|
* 'pool_shallow' => _('Shallow end'));
|
||||||
|
*
|
||||||
|
* The exported map will be available via SN.msg() to JS code:
|
||||||
|
*
|
||||||
|
* $('#pool').html('<div class="deepend"></div><div class="shallow"></div>');
|
||||||
|
* $('#pool .deepend').text(SN.msg('pool_deepend'));
|
||||||
|
* $('#pool .shallow').text(SN.msg('pool_shallow'));
|
||||||
|
*
|
||||||
|
* Exports a map of localized text strings to JavaScript code.
|
||||||
|
*
|
||||||
|
* Plugins can add to what's exported on any action by hooking the StartScriptMessages or
|
||||||
|
* EndScriptMessages events and appending to the array. Try to avoid adding strings that won't
|
||||||
|
* be used, as they'll be added to HTML output.
|
||||||
|
*/
|
||||||
|
function getScriptMessages()
|
||||||
|
{
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show OpenSearch headers
|
* Show OpenSearch headers
|
||||||
*
|
*
|
||||||
|
|
|
@ -483,9 +483,11 @@ class MessageCommand extends Command
|
||||||
|
|
||||||
if (Message::contentTooLong($this->text)) {
|
if (Message::contentTooLong($this->text)) {
|
||||||
// XXX: i18n. Needs plural support.
|
// XXX: i18n. Needs plural support.
|
||||||
// TRANS: Message given if content is too long.
|
// TRANS: Message given if content is too long. %1$sd is used for plural.
|
||||||
// TRANS: %1$d is the maximum number of characters, %2$d is the number of submitted characters.
|
// TRANS: %1$d is the maximum number of characters, %2$d is the number of submitted characters.
|
||||||
$channel->error($this->user, sprintf(_('Message too long - maximum is %1$d characters, you sent %2$d.'),
|
$channel->error($this->user, sprintf(_m('Message too long - maximum is %1$d character, you sent %2$d.',
|
||||||
|
'Message too long - maximum is %1$d characters, you sent %2$d.',
|
||||||
|
Message::maxContent()),
|
||||||
Message::maxContent(), mb_strlen($this->text)));
|
Message::maxContent(), mb_strlen($this->text)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -584,9 +586,11 @@ class ReplyCommand extends Command
|
||||||
|
|
||||||
if (Notice::contentTooLong($this->text)) {
|
if (Notice::contentTooLong($this->text)) {
|
||||||
// XXX: i18n. Needs plural support.
|
// XXX: i18n. Needs plural support.
|
||||||
// TRANS: Message given if content of a notice for a reply is too long.
|
// TRANS: Message given if content of a notice for a reply is too long. %1$d is used for plural.
|
||||||
// TRANS: %1$d is the maximum number of characters, %2$d is the number of submitted characters.
|
// TRANS: %1$d is the maximum number of characters, %2$d is the number of submitted characters.
|
||||||
$channel->error($this->user, sprintf(_('Notice too long - maximum is %1$d characters, you sent %2$d.'),
|
$channel->error($this->user, sprintf(_m('Notice too long - maximum is %1$d character, you sent %2$d.',
|
||||||
|
'Notice too long - maximum is %1$d characters, you sent %2$d.',
|
||||||
|
Notice::maxContent()),
|
||||||
Notice::maxContent(), mb_strlen($this->text)));
|
Notice::maxContent(), mb_strlen($this->text)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,7 @@ class FeedList extends Widget
|
||||||
if (!empty($feeds)) {
|
if (!empty($feeds)) {
|
||||||
$this->out->elementStart('div', array('id' => 'export_data',
|
$this->out->elementStart('div', array('id' => 'export_data',
|
||||||
'class' => 'section'));
|
'class' => 'section'));
|
||||||
|
// TRANS: Header for feed links (h2).
|
||||||
$this->out->element('h2', null, _('Feeds'));
|
$this->out->element('h2', null, _('Feeds'));
|
||||||
$this->out->elementStart('ul', array('class' => 'xoxo'));
|
$this->out->elementStart('ul', array('class' => 'xoxo'));
|
||||||
|
|
||||||
|
|
|
@ -160,14 +160,17 @@ class GroupEditForm extends Form
|
||||||
$this->out->elementStart('li');
|
$this->out->elementStart('li');
|
||||||
$this->out->input('homepage', _('Homepage'),
|
$this->out->input('homepage', _('Homepage'),
|
||||||
($this->out->arg('homepage')) ? $this->out->arg('homepage') : $homepage,
|
($this->out->arg('homepage')) ? $this->out->arg('homepage') : $homepage,
|
||||||
_('URL of the homepage or blog of the group or topic'));
|
_('URL of the homepage or blog of the group or topic.'));
|
||||||
$this->out->elementEnd('li');
|
$this->out->elementEnd('li');
|
||||||
$this->out->elementStart('li');
|
$this->out->elementStart('li');
|
||||||
$desclimit = User_group::maxDescription();
|
$desclimit = User_group::maxDescription();
|
||||||
if ($desclimit == 0) {
|
if ($desclimit == 0) {
|
||||||
$descinstr = _('Describe the group or topic');
|
$descinstr = _('Describe the group or topic');
|
||||||
} else {
|
} else {
|
||||||
$descinstr = sprintf(_('Describe the group or topic in %d characters'), $desclimit);
|
$descinstr = sprintf(_m('Describe the group or topic in %d character or less',
|
||||||
|
'Describe the group or topic in %d characters or less',
|
||||||
|
$desclimit),
|
||||||
|
$desclimit);
|
||||||
}
|
}
|
||||||
$this->out->textarea('description', _('Description'),
|
$this->out->textarea('description', _('Description'),
|
||||||
($this->out->arg('description')) ? $this->out->arg('description') : $description,
|
($this->out->arg('description')) ? $this->out->arg('description') : $description,
|
||||||
|
@ -176,7 +179,7 @@ class GroupEditForm extends Form
|
||||||
$this->out->elementStart('li');
|
$this->out->elementStart('li');
|
||||||
$this->out->input('location', _('Location'),
|
$this->out->input('location', _('Location'),
|
||||||
($this->out->arg('location')) ? $this->out->arg('location') : $location,
|
($this->out->arg('location')) ? $this->out->arg('location') : $location,
|
||||||
_('Location for the group, if any, like "City, State (or Region), Country"'));
|
_('Location for the group, if any, like "City, State (or Region), Country".'));
|
||||||
$this->out->elementEnd('li');
|
$this->out->elementEnd('li');
|
||||||
if (common_config('group', 'maxaliases') > 0) {
|
if (common_config('group', 'maxaliases') > 0) {
|
||||||
$aliases = (empty($this->group)) ? array() : $this->group->getAliases();
|
$aliases = (empty($this->group)) ? array() : $this->group->getAliases();
|
||||||
|
@ -184,7 +187,9 @@ class GroupEditForm extends Form
|
||||||
$this->out->input('aliases', _('Aliases'),
|
$this->out->input('aliases', _('Aliases'),
|
||||||
($this->out->arg('aliases')) ? $this->out->arg('aliases') :
|
($this->out->arg('aliases')) ? $this->out->arg('aliases') :
|
||||||
(!empty($aliases)) ? implode(' ', $aliases) : '',
|
(!empty($aliases)) ? implode(' ', $aliases) : '',
|
||||||
sprintf(_('Extra nicknames for the group, comma- or space- separated, max %d'),
|
sprintf(_m('Extra nicknames for the group, separated with commas or spaces. Maximum %d alias allowed.',
|
||||||
|
'Extra nicknames for the group, separated with commas or spaces. Maximum %d aliases allowed.',
|
||||||
|
common_config('group', 'maxaliases')),
|
||||||
common_config('group', 'maxaliases')));;
|
common_config('group', 'maxaliases')));;
|
||||||
$this->out->elementEnd('li');
|
$this->out->elementEnd('li');
|
||||||
}
|
}
|
||||||
|
@ -199,6 +204,6 @@ class GroupEditForm extends Form
|
||||||
|
|
||||||
function formActions()
|
function formActions()
|
||||||
{
|
{
|
||||||
$this->out->submit('submit', _('Save'));
|
$this->out->submit('submit', _m('BUTTON','Save'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,6 +85,8 @@ class ImageFile
|
||||||
break;
|
break;
|
||||||
case UPLOAD_ERR_INI_SIZE:
|
case UPLOAD_ERR_INI_SIZE:
|
||||||
case UPLOAD_ERR_FORM_SIZE:
|
case UPLOAD_ERR_FORM_SIZE:
|
||||||
|
// TRANS: Exception thrown when too large a file is uploaded.
|
||||||
|
// TRANS: %s is the maximum file size, for example "500b", "10kB" or "2MB".
|
||||||
throw new Exception(sprintf(_('That file is too big. The maximum file size is %s.'),
|
throw new Exception(sprintf(_('That file is too big. The maximum file size is %s.'),
|
||||||
ImageFile::maxFileSize()));
|
ImageFile::maxFileSize()));
|
||||||
return;
|
return;
|
||||||
|
@ -241,11 +243,16 @@ class ImageFile
|
||||||
$value = ImageFile::maxFileSizeInt();
|
$value = ImageFile::maxFileSizeInt();
|
||||||
|
|
||||||
if ($value > 1024 * 1024) {
|
if ($value > 1024 * 1024) {
|
||||||
return ($value/(1024*1024)) . _('MB');
|
$value = $value/(1024*1024);
|
||||||
|
// TRANS: Number of megabytes. %d is the number.
|
||||||
|
return sprintf(_m('%dMB','%dMB',$value),$value);
|
||||||
} else if ($value > 1024) {
|
} else if ($value > 1024) {
|
||||||
return ($value/(1024)) . _('kB');
|
$value = $value/1024;
|
||||||
|
// TRANS: Number of kilobytes. %d is the number.
|
||||||
|
return sprintf(_m('%dkB','%dkB',$value),$value);
|
||||||
} else {
|
} else {
|
||||||
return $value;
|
// TRANS: Number of bytes. %d is the number.
|
||||||
|
return sprintf(_m('%dB','%dB',$value),$value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,9 @@ class MailHandler
|
||||||
$msg = $this->cleanup_msg($msg);
|
$msg = $this->cleanup_msg($msg);
|
||||||
$msg = common_shorten_links($msg);
|
$msg = common_shorten_links($msg);
|
||||||
if (Notice::contentTooLong($msg)) {
|
if (Notice::contentTooLong($msg)) {
|
||||||
$this->error($from, sprintf(_('That\'s too long. '.
|
$this->error($from, sprintf(_('That\'s too long. Maximum notice size is %d character.',
|
||||||
'Max notice size is %d chars.'),
|
'That\'s too long. Maximum notice size is %d characters.',
|
||||||
|
Notice::maxContent()),
|
||||||
Notice::maxContent()));
|
Notice::maxContent()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
75
lib/ping.php
75
lib/ping.php
|
@ -20,13 +20,12 @@
|
||||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
function ping_broadcast_notice($notice) {
|
function ping_broadcast_notice($notice) {
|
||||||
|
if ($notice->is_local != Notice::LOCAL_PUBLIC && $notice->is_local != Notice::LOCAL_NONPUBLIC) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if ($notice->is_local != Notice::LOCAL_PUBLIC && $notice->is_local != Notice::LOCAL_NONPUBLIC) {
|
# Array of servers, URL => type
|
||||||
return true;
|
$notify = common_config('ping', 'notify');
|
||||||
}
|
|
||||||
|
|
||||||
# Array of servers, URL => type
|
|
||||||
$notify = common_config('ping', 'notify');
|
|
||||||
try {
|
try {
|
||||||
$profile = $notice->getProfile();
|
$profile = $notice->getProfile();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
@ -35,21 +34,21 @@ function ping_broadcast_notice($notice) {
|
||||||
common_log(LOG_ERR, "Exception getting notice profile: " . $e->getMessage());
|
common_log(LOG_ERR, "Exception getting notice profile: " . $e->getMessage());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$tags = ping_notice_tags($notice);
|
$tags = ping_notice_tags($notice);
|
||||||
|
|
||||||
foreach ($notify as $notify_url => $type) {
|
foreach ($notify as $notify_url => $type) {
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'xmlrpc':
|
case 'xmlrpc':
|
||||||
case 'extended':
|
case 'extended':
|
||||||
$req = xmlrpc_encode_request('weblogUpdates.ping',
|
$req = xmlrpc_encode_request('weblogUpdates.ping',
|
||||||
array($profile->nickname, # site name
|
array($profile->nickname, # site name
|
||||||
common_local_url('showstream',
|
common_local_url('showstream',
|
||||||
array('nickname' => $profile->nickname)),
|
array('nickname' => $profile->nickname)),
|
||||||
common_local_url('shownotice',
|
common_local_url('shownotice',
|
||||||
array('notice' => $notice->id)),
|
array('notice' => $notice->id)),
|
||||||
common_local_url('userrss',
|
common_local_url('userrss',
|
||||||
array('nickname' => $profile->nickname)),
|
array('nickname' => $profile->nickname)),
|
||||||
$tags));
|
$tags));
|
||||||
|
|
||||||
$request = HTTPClient::start();
|
$request = HTTPClient::start();
|
||||||
$request->setConfig('connect_timeout', common_config('ping', 'timeout'));
|
$request->setConfig('connect_timeout', common_config('ping', 'timeout'));
|
||||||
|
@ -79,9 +78,8 @@ function ping_broadcast_notice($notice) {
|
||||||
"Ping success for $notify_url $notice->id");
|
"Ping success for $notify_url $notice->id");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'get':
|
||||||
case 'get':
|
case 'post':
|
||||||
case 'post':
|
|
||||||
$args = array('name' => $profile->nickname,
|
$args = array('name' => $profile->nickname,
|
||||||
'url' => common_local_url('showstream',
|
'url' => common_local_url('showstream',
|
||||||
array('nickname' => $profile->nickname)),
|
array('nickname' => $profile->nickname)),
|
||||||
|
@ -108,26 +106,25 @@ function ping_broadcast_notice($notice) {
|
||||||
"'$result->body'");
|
"'$result->body'");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
default:
|
common_log(LOG_WARNING, 'Unknown notify type for ' . $notify_url . ': ' . $type);
|
||||||
common_log(LOG_WARNING, 'Unknown notify type for ' . $notify_url . ': ' . $type);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function ping_notice_tags($notice) {
|
function ping_notice_tags($notice) {
|
||||||
$tag = new Notice_tag();
|
$tag = new Notice_tag();
|
||||||
$tag->notice_id = $notice->id;
|
$tag->notice_id = $notice->id;
|
||||||
$tags = array();
|
$tags = array();
|
||||||
if ($tag->find()) {
|
if ($tag->find()) {
|
||||||
while ($tag->fetch()) {
|
while ($tag->fetch()) {
|
||||||
$tags[] = $tag->tag;
|
$tags[] = $tag->tag;
|
||||||
}
|
}
|
||||||
$tag->free();
|
$tag->free();
|
||||||
unset($tag);
|
unset($tag);
|
||||||
return implode('|', $tags);
|
return implode('|', $tags);
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,6 @@ class SearchAction extends Action
|
||||||
* @return void
|
* @return void
|
||||||
* @see SearchGroupNav
|
* @see SearchGroupNav
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showLocalNav()
|
function showLocalNav()
|
||||||
{
|
{
|
||||||
$nav = new SearchGroupNav($this, $this->trimmed('q'));
|
$nav = new SearchGroupNav($this, $this->trimmed('q'));
|
||||||
|
@ -127,6 +126,7 @@ class SearchAction extends Action
|
||||||
// TRANS: Used as a field label for the field where one or more keywords
|
// TRANS: Used as a field label for the field where one or more keywords
|
||||||
// TRANS: for searching can be entered.
|
// TRANS: for searching can be entered.
|
||||||
$this->input('q', _('Keyword(s)'), $q);
|
$this->input('q', _('Keyword(s)'), $q);
|
||||||
|
// TRANS: Button text for searching site.
|
||||||
$this->submit('search', _m('BUTTON','Search'));
|
$this->submit('search', _m('BUTTON','Search'));
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementEnd('ul');
|
$this->elementEnd('ul');
|
||||||
|
@ -138,7 +138,7 @@ class SearchAction extends Action
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchSuggestions($q) {
|
function searchSuggestions($q) {
|
||||||
// @todo FIXME: This formatting does not make this string get picked up by gettext.
|
// @todo FIXME: i18n issue: This formatting does not make this string get picked up by gettext.
|
||||||
// TRANS: Standard search suggestions shown when a search does not give any results.
|
// TRANS: Standard search suggestions shown when a search does not give any results.
|
||||||
$message = _(<<<E_O_T
|
$message = _(<<<E_O_T
|
||||||
* Make sure all words are spelled correctly.
|
* Make sure all words are spelled correctly.
|
||||||
|
@ -150,7 +150,7 @@ E_O_T
|
||||||
);
|
);
|
||||||
if (!common_config('site', 'private')) {
|
if (!common_config('site', 'private')) {
|
||||||
$qe = urlencode($q);
|
$qe = urlencode($q);
|
||||||
// @todo FIXME: This formatting does not make this string get picked up by gettext.
|
// @todo FIXME: i18n issue: This formatting does not make this string get picked up by gettext.
|
||||||
// TRANS: Standard search suggestions shown when a search does not give any results.
|
// TRANS: Standard search suggestions shown when a search does not give any results.
|
||||||
$message .= sprintf(_(<<<E_O_T
|
$message .= sprintf(_(<<<E_O_T
|
||||||
|
|
||||||
|
|
|
@ -163,9 +163,10 @@ class ThemeUploader
|
||||||
$estSize = $blockSize * max(1, intval(ceil($size / $blockSize)));
|
$estSize = $blockSize * max(1, intval(ceil($size / $blockSize)));
|
||||||
$totalSize += $estSize;
|
$totalSize += $estSize;
|
||||||
if ($totalSize > $sizeLimit) {
|
if ($totalSize > $sizeLimit) {
|
||||||
$msg = sprintf(_("Uploaded theme is too large; " .
|
$msg = sprintf(_m('Uploaded theme is too large; must be less than %d byte uncompressed.',
|
||||||
"must be less than %d bytes uncompressed."),
|
'Uploaded theme is too large; must be less than %d bytes uncompressed.',
|
||||||
$sizeLimit);
|
$sizeLimit),
|
||||||
|
$sizeLimit);
|
||||||
throw new ClientException($msg);
|
throw new ClientException($msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,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
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
abstract class UAPPlugin extends Plugin
|
abstract class UAPPlugin extends Plugin
|
||||||
{
|
{
|
||||||
public $mediumRectangle = null;
|
public $mediumRectangle = null;
|
||||||
|
@ -66,7 +65,6 @@ abstract class UAPPlugin extends Plugin
|
||||||
*
|
*
|
||||||
* @return boolean hook flag
|
* @return boolean hook flag
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function onEndShowStatusNetStyles($action)
|
function onEndShowStatusNetStyles($action)
|
||||||
{
|
{
|
||||||
// XXX: allow override by theme
|
// XXX: allow override by theme
|
||||||
|
@ -81,7 +79,6 @@ abstract class UAPPlugin extends Plugin
|
||||||
*
|
*
|
||||||
* @return boolean hook flag
|
* @return boolean hook flag
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function onStartShowAside($action)
|
function onStartShowAside($action)
|
||||||
{
|
{
|
||||||
if (!is_null($this->mediumRectangle)) {
|
if (!is_null($this->mediumRectangle)) {
|
||||||
|
@ -95,6 +92,24 @@ abstract class UAPPlugin extends Plugin
|
||||||
$action->elementEnd('div');
|
$action->elementEnd('div');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX: Hack to force ads to show on single-notice pages
|
||||||
|
|
||||||
|
if (!is_null($this->rectangle) &&
|
||||||
|
$action->trimmed('action') == 'shownotice') {
|
||||||
|
|
||||||
|
$action->elementStart('div', array('id' => 'aside_primary',
|
||||||
|
'class' => 'aside'));
|
||||||
|
|
||||||
|
if (Event::handle('StartShowSections', array($action))) {
|
||||||
|
$action->showSections();
|
||||||
|
Event::handle('EndShowSections', array($action));
|
||||||
|
}
|
||||||
|
|
||||||
|
$action->elementEnd('div');
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,7 +141,6 @@ abstract class UAPPlugin extends Plugin
|
||||||
*
|
*
|
||||||
* @return boolean hook flag
|
* @return boolean hook flag
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function onStartShowSections($action)
|
function onStartShowSections($action)
|
||||||
{
|
{
|
||||||
if (!is_null($this->rectangle)) {
|
if (!is_null($this->rectangle)) {
|
||||||
|
@ -147,7 +161,6 @@ abstract class UAPPlugin extends Plugin
|
||||||
*
|
*
|
||||||
* @return boolean hook flag
|
* @return boolean hook flag
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function onEndShowAside($action)
|
function onEndShowAside($action)
|
||||||
{
|
{
|
||||||
if (!is_null($this->wideSkyscraper)) {
|
if (!is_null($this->wideSkyscraper)) {
|
||||||
|
@ -169,7 +182,6 @@ abstract class UAPPlugin extends Plugin
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
abstract protected function showMediumRectangle($action);
|
abstract protected function showMediumRectangle($action);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -179,7 +191,6 @@ abstract class UAPPlugin extends Plugin
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
abstract protected function showRectangle($action);
|
abstract protected function showRectangle($action);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -189,7 +200,6 @@ abstract class UAPPlugin extends Plugin
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
abstract protected function showWideSkyscraper($action);
|
abstract protected function showWideSkyscraper($action);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -199,6 +209,5 @@ abstract class UAPPlugin extends Plugin
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
abstract protected function showLeaderboard($action);
|
abstract protected function showLeaderboard($action);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,6 @@ if (!defined('STATUSNET')) {
|
||||||
*
|
*
|
||||||
* @see BlockForm
|
* @see BlockForm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class UnblockForm extends ProfileActionForm
|
class UnblockForm extends ProfileActionForm
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -52,7 +51,6 @@ class UnblockForm extends ProfileActionForm
|
||||||
*
|
*
|
||||||
* @return string Name of the action, lowercased.
|
* @return string Name of the action, lowercased.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function target()
|
function target()
|
||||||
{
|
{
|
||||||
return 'unblock';
|
return 'unblock';
|
||||||
|
@ -63,11 +61,10 @@ class UnblockForm extends ProfileActionForm
|
||||||
*
|
*
|
||||||
* @return string Title of the form, internationalized
|
* @return string Title of the form, internationalized
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
// TRANS: Title for the form to unblock a user.
|
// TRANS: Title for the form to unblock a user.
|
||||||
return _('Unblock');
|
return _m('TITLE','Unblock');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -75,7 +72,6 @@ class UnblockForm extends ProfileActionForm
|
||||||
*
|
*
|
||||||
* @return string description of the form, internationalized
|
* @return string description of the form, internationalized
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function description()
|
function description()
|
||||||
{
|
{
|
||||||
// TRANS: Description of the form to unblock a user.
|
// TRANS: Description of the form to unblock a user.
|
||||||
|
|
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
File diff suppressed because it is too large
Load Diff
|
@ -10,14 +10,14 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: StatusNet - Adsense\n"
|
"Project-Id-Version: StatusNet - Adsense\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2010-10-27 23:43+0000\n"
|
"POT-Creation-Date: 2010-10-30 23:18+0000\n"
|
||||||
"PO-Revision-Date: 2010-10-27 23:46:09+0000\n"
|
"PO-Revision-Date: 2010-10-30 23:20:58+0000\n"
|
||||||
"Language-Team: Brazilian Portuguese <http://translatewiki.net/wiki/Portal:pt-"
|
"Language-Team: Brazilian Portuguese <http://translatewiki.net/wiki/Portal:pt-"
|
||||||
"br>\n"
|
"br>\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-POT-Import-Date: 2010-10-20 17:58:21+0000\n"
|
"X-POT-Import-Date: 2010-10-29 16:11:50+0000\n"
|
||||||
"X-Generator: MediaWiki 1.17alpha (r75590); Translate extension (2010-09-17)\n"
|
"X-Generator: MediaWiki 1.17alpha (r75708); Translate extension (2010-09-17)\n"
|
||||||
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||||
"X-Language-Code: pt-br\n"
|
"X-Language-Code: pt-br\n"
|
||||||
"X-Message-Group: #out-statusnet-plugin-adsense\n"
|
"X-Message-Group: #out-statusnet-plugin-adsense\n"
|
||||||
|
@ -80,7 +80,7 @@ msgstr "Código colocado dentro de um retângulo."
|
||||||
|
|
||||||
#: adsenseadminpanel.php:188
|
#: adsenseadminpanel.php:188
|
||||||
msgid "Leaderboard"
|
msgid "Leaderboard"
|
||||||
msgstr ""
|
msgstr "Classificação"
|
||||||
|
|
||||||
#: adsenseadminpanel.php:189
|
#: adsenseadminpanel.php:189
|
||||||
msgid "Leaderboard slot code"
|
msgid "Leaderboard slot code"
|
||||||
|
|
|
@ -9,13 +9,13 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: StatusNet - Facebook\n"
|
"Project-Id-Version: StatusNet - Facebook\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2010-10-27 23:43+0000\n"
|
"POT-Creation-Date: 2010-10-30 23:18+0000\n"
|
||||||
"PO-Revision-Date: 2010-10-27 23:46:35+0000\n"
|
"PO-Revision-Date: 2010-10-30 23:21:30+0000\n"
|
||||||
"Language-Team: Dutch <http://translatewiki.net/wiki/Portal:nl>\n"
|
"Language-Team: Dutch <http://translatewiki.net/wiki/Portal:nl>\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-POT-Import-Date: 2010-10-23 18:57:01+0000\n"
|
"X-POT-Import-Date: 2010-10-29 16:12:45+0000\n"
|
||||||
"X-Generator: MediaWiki 1.17alpha (r75590); Translate extension (2010-09-17)\n"
|
"X-Generator: MediaWiki 1.17alpha (r75708); Translate extension (2010-09-17)\n"
|
||||||
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||||
"X-Language-Code: nl\n"
|
"X-Language-Code: nl\n"
|
||||||
"X-Message-Group: #out-statusnet-plugin-facebook\n"
|
"X-Message-Group: #out-statusnet-plugin-facebook\n"
|
||||||
|
@ -37,7 +37,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Hallo %1$s.\n"
|
"Hallo %1$s.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Het spijt ons je te moeten meedelen dat het niet mogelijk is uw "
|
"Het spijt ons u te moeten meedelen dat het niet mogelijk is uw "
|
||||||
"Facebookstatus bij te werken vanuit %2$s. De Facebookapplicatie is "
|
"Facebookstatus bij te werken vanuit %2$s. De Facebookapplicatie is "
|
||||||
"uitgeschakeld voor uw gebruiker. Dit kan komen doordat u de toegangsrechten "
|
"uitgeschakeld voor uw gebruiker. Dit kan komen doordat u de toegangsrechten "
|
||||||
"voor de Facebookapplicatie hebt ingetrokken of omdat u uw Facebookgebruiker "
|
"voor de Facebookapplicatie hebt ingetrokken of omdat u uw Facebookgebruiker "
|
||||||
|
|
|
@ -550,7 +550,8 @@ class Ostatus_profile extends Managed_DataObject
|
||||||
// We mark up the attachment link specially for the HTML output
|
// We mark up the attachment link specially for the HTML output
|
||||||
// so we can fold-out the full version inline.
|
// so we can fold-out the full version inline.
|
||||||
|
|
||||||
// TRANS: Shown when a notice is longer than supported and/or when attachments are present.
|
// @fixme I18N this tooltip will be saved with the site's default language
|
||||||
|
// TRANS: Shown when a notice is longer than supported and/or when attachments are present. At runtime this will usually be replaced with localized text from StatusNet core messages.
|
||||||
$showMoreText = _m('Show more');
|
$showMoreText = _m('Show more');
|
||||||
$attachUrl = common_local_url('attachment',
|
$attachUrl = common_local_url('attachment',
|
||||||
array('attachment' => $attachment->id));
|
array('attachment' => $attachment->id));
|
||||||
|
|
|
@ -5,6 +5,6 @@
|
||||||
* Pause ~ retain up to 50-100 most recent notices
|
* Pause ~ retain up to 50-100 most recent notices
|
||||||
* Add geo data
|
* Add geo data
|
||||||
* Make it work for Conversation page (perhaps a little tricky)
|
* Make it work for Conversation page (perhaps a little tricky)
|
||||||
* IE is updating the counter in document title all the time (Not sure if this is still an issue)
|
* IE is updating the counter in document title all the time (Not sure if this
|
||||||
|
is still an issue)
|
||||||
* Reconsider the timestamp approach
|
* Reconsider the timestamp approach
|
||||||
|
|
||||||
|
|
|
@ -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
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class RealtimePlugin extends Plugin
|
class RealtimePlugin extends Plugin
|
||||||
{
|
{
|
||||||
protected $replyurl = null;
|
protected $replyurl = null;
|
||||||
|
@ -326,6 +325,32 @@ class RealtimePlugin extends Plugin
|
||||||
return array('plugins/Realtime/realtimeupdate.js');
|
return array('plugins/Realtime/realtimeupdate.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Export any i18n messages that need to be loaded at runtime...
|
||||||
|
*
|
||||||
|
* @param Action $action
|
||||||
|
* @param array $messages
|
||||||
|
*
|
||||||
|
* @return boolean hook return value
|
||||||
|
*/
|
||||||
|
function onEndScriptMessages($action, &$messages)
|
||||||
|
{
|
||||||
|
// TRANS: Text label for realtime view "play" button, usually replaced by an icon.
|
||||||
|
$messages['realtime_play'] = _m('BUTTON', 'Play');
|
||||||
|
// TRANS: Tooltip for realtime view "play" button.
|
||||||
|
$messages['realtime_play_tooltip'] = _m('TOOLTIP', 'Play');
|
||||||
|
// TRANS: Text label for realtime view "pause" button
|
||||||
|
$messages['realtime_pause'] = _m('BUTTON', 'Pause');
|
||||||
|
// TRANS: Tooltip for realtime view "pause" button
|
||||||
|
$messages['realtime_pause_tooltip'] = _m('TOOLTIP', 'Pause');
|
||||||
|
// TRANS: Text label for realtime view "popup" button, usually replaced by an icon.
|
||||||
|
$messages['realtime_popup'] = _m('BUTTON', 'Pop up');
|
||||||
|
// TRANS: Tooltip for realtime view "popup" button.
|
||||||
|
$messages['realtime_popup_tooltip'] = _m('TOOLTIP', 'Pop up in a window');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
function _updateInitialize($timeline, $user_id)
|
function _updateInitialize($timeline, $user_id)
|
||||||
{
|
{
|
||||||
return "RealtimeUpdate.init($user_id, \"$this->replyurl\", \"$this->favorurl\", \"$this->repeaturl\", \"$this->deleteurl\"); ";
|
return "RealtimeUpdate.init($user_id, \"$this->replyurl\", \"$this->favorurl\", \"$this->repeaturl\", \"$this->deleteurl\"); ";
|
||||||
|
|
53
plugins/Realtime/locale/Realtime.pot
Normal file
53
plugins/Realtime/locale/Realtime.pot
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||||
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2010-11-02 19:46+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"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=CHARSET\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
|
#. TRANS: Text label for realtime view "play" button, usually replaced by an icon.
|
||||||
|
#: RealtimePlugin.php:339
|
||||||
|
msgctxt "BUTTON"
|
||||||
|
msgid "Play"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. TRANS: Tooltip for realtime view "play" button.
|
||||||
|
#: RealtimePlugin.php:341
|
||||||
|
msgctxt "TOOLTIP"
|
||||||
|
msgid "Play"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. TRANS: Text label for realtime view "pause" button
|
||||||
|
#: RealtimePlugin.php:343
|
||||||
|
msgctxt "BUTTON"
|
||||||
|
msgid "Pause"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. TRANS: Tooltip for realtime view "pause" button
|
||||||
|
#: RealtimePlugin.php:345
|
||||||
|
msgctxt "TOOLTIP"
|
||||||
|
msgid "Pause"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. TRANS: Text label for realtime view "popup" button, usually replaced by an icon.
|
||||||
|
#: RealtimePlugin.php:347
|
||||||
|
msgctxt "BUTTON"
|
||||||
|
msgid "Pop up"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. TRANS: Tooltip for realtime view "popup" button.
|
||||||
|
#: RealtimePlugin.php:349
|
||||||
|
msgctxt "TOOLTIP"
|
||||||
|
msgid "Pop up in a window"
|
||||||
|
msgstr ""
|
|
@ -35,7 +35,6 @@ width:70%;
|
||||||
margin-left:1%;
|
margin-left:1%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#notices_primary {
|
#notices_primary {
|
||||||
position:relative;
|
position:relative;
|
||||||
}
|
}
|
||||||
|
@ -75,4 +74,3 @@ line-height:1.2;
|
||||||
#showstream #notices_primary {
|
#showstream #notices_primary {
|
||||||
margin-top: 18px;
|
margin-top: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -261,9 +261,10 @@ RealtimeUpdate = {
|
||||||
RealtimeUpdate.addNoticesHover();
|
RealtimeUpdate.addNoticesHover();
|
||||||
|
|
||||||
$('#realtime_playpause').remove();
|
$('#realtime_playpause').remove();
|
||||||
$('#realtime_actions').prepend('<li id="realtime_playpause"><button id="realtime_pause" class="pause" title="Pause">Pause</button></li>');
|
$('#realtime_actions').prepend('<li id="realtime_playpause"><button id="realtime_pause" class="pause"></button></li>');
|
||||||
|
$('#realtime_pause').text(SN.msg('realtime_pause'))
|
||||||
$('#realtime_pause').bind('click', function() {
|
.attr('title', SN.msg('realtime_pause_tooltip'))
|
||||||
|
.bind('click', function() {
|
||||||
RealtimeUpdate.removeNoticesHover();
|
RealtimeUpdate.removeNoticesHover();
|
||||||
RealtimeUpdate.showPlay();
|
RealtimeUpdate.showPlay();
|
||||||
return false;
|
return false;
|
||||||
|
@ -274,9 +275,10 @@ RealtimeUpdate = {
|
||||||
{
|
{
|
||||||
RealtimeUpdate.setPause(true);
|
RealtimeUpdate.setPause(true);
|
||||||
$('#realtime_playpause').remove();
|
$('#realtime_playpause').remove();
|
||||||
$('#realtime_actions').prepend('<li id="realtime_playpause"><span id="queued_counter"></span> <button id="realtime_play" class="play" title="Play">Play</button></li>');
|
$('#realtime_actions').prepend('<li id="realtime_playpause"><span id="queued_counter"></span> <button id="realtime_play" class="play"></button></li>');
|
||||||
|
$('#realtime_play').text(SN.msg('realtime_play'))
|
||||||
$('#realtime_play').bind('click', function() {
|
.attr('title', SN.msg('realtime_play_tooltip'))
|
||||||
|
.bind('click', function() {
|
||||||
RealtimeUpdate.showPause();
|
RealtimeUpdate.showPause();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
@ -334,10 +336,11 @@ RealtimeUpdate = {
|
||||||
|
|
||||||
initAddPopup: function(url, timeline, path)
|
initAddPopup: function(url, timeline, path)
|
||||||
{
|
{
|
||||||
$('#realtime_timeline').append('<button id="realtime_popup" title="Pop up in a window">Pop up</button>');
|
$('#realtime_timeline').append('<button id="realtime_popup"></button>');
|
||||||
|
$('#realtime_popup').text(SN.msg('realtime_popup'))
|
||||||
$('#realtime_popup').bind('click', function() {
|
.attr('title', SN.msg('realtime_popup_tooltip'))
|
||||||
window.open(url,
|
.bind('click', function() {
|
||||||
|
window.open(url,
|
||||||
'',
|
'',
|
||||||
'toolbar=no,resizable=yes,scrollbars=yes,status=no,menubar=no,personalbar=no,location=no,width=500,height=550');
|
'toolbar=no,resizable=yes,scrollbars=yes,status=no,menubar=no,personalbar=no,location=no,width=500,height=550');
|
||||||
|
|
||||||
|
|
30
plugins/XCache/locale/fi/LC_MESSAGES/XCache.po
Normal file
30
plugins/XCache/locale/fi/LC_MESSAGES/XCache.po
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
# Translation of StatusNet - XCache to Finnish (Suomi)
|
||||||
|
# Expored from translatewiki.net
|
||||||
|
#
|
||||||
|
# Author: Centerlink
|
||||||
|
# --
|
||||||
|
# This file is distributed under the same license as the StatusNet package.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: StatusNet - XCache\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2010-10-30 23:18+0000\n"
|
||||||
|
"PO-Revision-Date: 2010-10-30 23:23:06+0000\n"
|
||||||
|
"Language-Team: Finnish <http://translatewiki.net/wiki/Portal:fi>\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-POT-Import-Date: 2010-10-29 16:14:46+0000\n"
|
||||||
|
"X-Generator: MediaWiki 1.17alpha (r75708); Translate extension (2010-09-17)\n"
|
||||||
|
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||||
|
"X-Language-Code: fi\n"
|
||||||
|
"X-Message-Group: #out-statusnet-plugin-xcache\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#: XCachePlugin.php:120
|
||||||
|
msgid ""
|
||||||
|
"Use the <a href=\"http://xcache.lighttpd.net/\">XCache</a> variable cache to "
|
||||||
|
"cache query results."
|
||||||
|
msgstr ""
|
||||||
|
"Käytä <a href=\"http://xcache.lighttpd.net/\">XCache</a>-muuttujavälimuistia "
|
||||||
|
"kyselyn tulosten tallentamiseksi välimuistiin."
|
57
scripts/make-release.php
Normal file
57
scripts/make-release.php
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
#!/usr/bin/env php
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* StatusNet - the distributed open-source microblogging tool
|
||||||
|
* Copyright (C) 2010, StatusNet, Inc.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
# Abort if called from a web server
|
||||||
|
|
||||||
|
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
|
||||||
|
|
||||||
|
require_once INSTALLDIR.'/scripts/commandline.inc';
|
||||||
|
|
||||||
|
$base = INSTALLDIR;
|
||||||
|
$encBase = escapeshellarg($base);
|
||||||
|
|
||||||
|
$ver = STATUSNET_VERSION;
|
||||||
|
|
||||||
|
// @fixme hack
|
||||||
|
if (preg_match('/^(\d+)\.(\d+)\.(\d+)/', $ver, $matches)) {
|
||||||
|
list(, $a, $b, $c) = $matches;
|
||||||
|
if ($c > '0') {
|
||||||
|
$cprime = $c - 1;
|
||||||
|
$prev = "$a.$b.$cprime";
|
||||||
|
} else {
|
||||||
|
die("This is a .0 release; you need to provide a thingy.\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$tag = $ver;
|
||||||
|
$prefix = "statusnet-$tag";
|
||||||
|
$target = "$prefix.tar.gz";
|
||||||
|
|
||||||
|
$cmd = <<<END
|
||||||
|
(cd $encBase && git archive --prefix=$prefix/ $tag | gzip > /tmp/$target) && \
|
||||||
|
(cd /tmp && tar zxf $target && cd $prefix && make) && \
|
||||||
|
(cd $encBase && git log --oneline {$prev}..{$tag} > /tmp/$prefix/Changelog) && \
|
||||||
|
(cd /tmp && tar zcf $target $prefix) && \
|
||||||
|
(cd /tmp && rm -rf $prefix) && \
|
||||||
|
(mv /tmp/$target .)
|
||||||
|
END;
|
||||||
|
|
||||||
|
echo $cmd;
|
||||||
|
echo "\n";
|
Loading…
Reference in New Issue
Block a user