Merge branch '0.9.x' into testing
This commit is contained in:
commit
6fa0bea76d
|
@ -39,7 +39,6 @@ require_once INSTALLDIR.'/lib/apibareauth.php';
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ApiAtomServiceAction extends ApiBareAuthAction
|
class ApiAtomServiceAction extends ApiBareAuthAction
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -50,13 +49,13 @@ class ApiAtomServiceAction extends ApiBareAuthAction
|
||||||
* @return boolean success flag
|
* @return boolean success flag
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
$this->user = $this->getTargetUser($this->arg('id'));
|
$this->user = $this->getTargetUser($this->arg('id'));
|
||||||
|
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
|
// TRANS: Client error displayed when making an Atom API request for an unknown user.
|
||||||
$this->clientError(_('No such user.'), 404, $this->format);
|
$this->clientError(_('No such user.'), 404, $this->format);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -71,7 +70,6 @@ class ApiAtomServiceAction extends ApiBareAuthAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
|
@ -83,13 +81,15 @@ class ApiAtomServiceAction extends ApiBareAuthAction
|
||||||
'xmlns:atom' => 'http://www.w3.org/2005/Atom',
|
'xmlns:atom' => 'http://www.w3.org/2005/Atom',
|
||||||
'xmlns:activity' => 'http://activitystrea.ms/spec/1.0/'));
|
'xmlns:activity' => 'http://activitystrea.ms/spec/1.0/'));
|
||||||
$this->elementStart('workspace');
|
$this->elementStart('workspace');
|
||||||
$this->element('atom:title', null, _('Main'));
|
// TRANS: Title for Atom feed.
|
||||||
|
$this->element('atom:title', null, _m('ATOM','Main'));
|
||||||
$this->elementStart('collection',
|
$this->elementStart('collection',
|
||||||
array('href' => common_local_url('ApiTimelineUser',
|
array('href' => common_local_url('ApiTimelineUser',
|
||||||
array('id' => $this->user->id,
|
array('id' => $this->user->id,
|
||||||
'format' => 'atom'))));
|
'format' => 'atom'))));
|
||||||
$this->element('atom:title',
|
$this->element('atom:title',
|
||||||
null,
|
null,
|
||||||
|
// TRANS: Title for Atom feed. %s is a user nickname.
|
||||||
sprintf(_("%s timeline"),
|
sprintf(_("%s timeline"),
|
||||||
$this->user->nickname));
|
$this->user->nickname));
|
||||||
$this->element('accept', null, 'application/atom+xml;type=entry');
|
$this->element('accept', null, 'application/atom+xml;type=entry');
|
||||||
|
@ -100,6 +100,7 @@ class ApiAtomServiceAction extends ApiBareAuthAction
|
||||||
array('subscriber' => $this->user->id))));
|
array('subscriber' => $this->user->id))));
|
||||||
$this->element('atom:title',
|
$this->element('atom:title',
|
||||||
null,
|
null,
|
||||||
|
// TRANS: Title for Atom feed with a user's subscriptions. %s is a user nickname.
|
||||||
sprintf(_("%s subscriptions"),
|
sprintf(_("%s subscriptions"),
|
||||||
$this->user->nickname));
|
$this->user->nickname));
|
||||||
$this->element('accept', null, 'application/atom+xml;type=entry');
|
$this->element('accept', null, 'application/atom+xml;type=entry');
|
||||||
|
@ -110,6 +111,7 @@ class ApiAtomServiceAction extends ApiBareAuthAction
|
||||||
array('profile' => $this->user->id))));
|
array('profile' => $this->user->id))));
|
||||||
$this->element('atom:title',
|
$this->element('atom:title',
|
||||||
null,
|
null,
|
||||||
|
// TRANS: Title for Atom feed with a user's favorite notices. %s is a user nickname.
|
||||||
sprintf(_("%s favorites"),
|
sprintf(_("%s favorites"),
|
||||||
$this->user->nickname));
|
$this->user->nickname));
|
||||||
$this->element('accept', null, 'application/atom+xml;type=entry');
|
$this->element('accept', null, 'application/atom+xml;type=entry');
|
||||||
|
@ -120,6 +122,7 @@ class ApiAtomServiceAction extends ApiBareAuthAction
|
||||||
array('profile' => $this->user->id))));
|
array('profile' => $this->user->id))));
|
||||||
$this->element('atom:title',
|
$this->element('atom:title',
|
||||||
null,
|
null,
|
||||||
|
// TRANS: Title for Atom feed with a user's memberships. %s is a user nickname.
|
||||||
sprintf(_("%s memberships"),
|
sprintf(_("%s memberships"),
|
||||||
$this->user->nickname));
|
$this->user->nickname));
|
||||||
$this->element('accept', null, 'application/atom+xml;type=entry');
|
$this->element('accept', null, 'application/atom+xml;type=entry');
|
||||||
|
|
|
@ -92,6 +92,7 @@ class ApiBlockCreateAction extends ApiAuthAction
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($this->user) || empty($this->other)) {
|
if (empty($this->user) || empty($this->other)) {
|
||||||
|
// TRANS: Client error displayed when trying to block a non-existing user or a user from another site.
|
||||||
$this->clientError(_('No such user.'), 404, $this->format);
|
$this->clientError(_('No such user.'), 404, $this->format);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,6 +114,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
|
||||||
$this->deleteNotice();
|
$this->deleteNotice();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
// TRANS: Client error displayed calling an unsupported HTTP error in API status show.
|
||||||
$this->clientError(_('HTTP method not supported.'), 405);
|
$this->clientError(_('HTTP method not supported.'), 405);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -138,6 +139,8 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
|
||||||
$this->showSingleAtomStatus($this->notice);
|
$this->showSingleAtomStatus($this->notice);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
// TRANS: Exception thrown requesting an unsupported notice output format.
|
||||||
|
// TRANS: %s is the requested output format.
|
||||||
throw new Exception(sprintf(_("Unsupported format: %s"), $this->format));
|
throw new Exception(sprintf(_("Unsupported format: %s"), $this->format));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -220,6 +223,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
|
||||||
function deleteNotice()
|
function deleteNotice()
|
||||||
{
|
{
|
||||||
if ($this->format != 'atom') {
|
if ($this->format != 'atom') {
|
||||||
|
// TRANS: Client error displayed when trying to delete a notice not using the Atom format.
|
||||||
$this->clientError(_("Can only delete using the Atom format."));
|
$this->clientError(_("Can only delete using the Atom format."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -227,7 +231,8 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
|
||||||
if (empty($this->auth_user) ||
|
if (empty($this->auth_user) ||
|
||||||
($this->notice->profile_id != $this->auth_user->id &&
|
($this->notice->profile_id != $this->auth_user->id &&
|
||||||
!$this->auth_user->hasRight(Right::DELETEOTHERSNOTICE))) {
|
!$this->auth_user->hasRight(Right::DELETEOTHERSNOTICE))) {
|
||||||
$this->clientError(_('Can\'t delete this notice.'), 403);
|
// TRANS: Client error displayed when a user has no rights to delete notices of other users.
|
||||||
|
$this->clientError(_('Cannot delete this notice.'), 403);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,6 +245,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
|
||||||
|
|
||||||
header('HTTP/1.1 200 OK');
|
header('HTTP/1.1 200 OK');
|
||||||
header('Content-Type: text/plain');
|
header('Content-Type: text/plain');
|
||||||
|
// TRANS: Confirmation of notice deletion in API. %d is the ID (number) of the deleted notice.
|
||||||
print(sprintf(_('Deleted notice %d'), $this->notice->id));
|
print(sprintf(_('Deleted notice %d'), $this->notice->id));
|
||||||
print("\n");
|
print("\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -307,11 +307,13 @@ class ApiTimelineUserAction extends ApiBareAuthAction
|
||||||
|
|
||||||
$xml = trim(file_get_contents('php://input'));
|
$xml = trim(file_get_contents('php://input'));
|
||||||
if (empty($xml)) {
|
if (empty($xml)) {
|
||||||
|
// TRANS: Client error displayed attempting to post an empty API notice.
|
||||||
$this->clientError(_('Atom post must not be empty.'));
|
$this->clientError(_('Atom post must not be empty.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$dom = DOMDocument::loadXML($xml);
|
$dom = DOMDocument::loadXML($xml);
|
||||||
if (!$dom) {
|
if (!$dom) {
|
||||||
|
// TRANS: Client error displayed attempting to post an API that is not well-formed XML.
|
||||||
$this->clientError(_('Atom post must be well-formed XML.'));
|
$this->clientError(_('Atom post must be well-formed XML.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -375,6 +377,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
|
||||||
} else {
|
} else {
|
||||||
// @fixme fetch from $sourceUrl?
|
// @fixme fetch from $sourceUrl?
|
||||||
// TRANS: Client error displayed when posting a notice without content through the API.
|
// TRANS: Client error displayed when posting a notice without content through the API.
|
||||||
|
// TRANS: %d is the notice ID (number).
|
||||||
$this->clientError(sprintf(_('No content for notice %d.'),
|
$this->clientError(sprintf(_('No content for notice %d.'),
|
||||||
$note->id));
|
$note->id));
|
||||||
return;
|
return;
|
||||||
|
@ -434,7 +437,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
|
||||||
$options['groups'][] = $uri;
|
$options['groups'][] = $uri;
|
||||||
} else {
|
} else {
|
||||||
// @fixme: hook for discovery here
|
// @fixme: hook for discovery here
|
||||||
common_log(LOG_WARNING, sprintf(_('AtomPub post with unknown attention URI %s'), $uri));
|
common_log(LOG_WARNING, sprintf('AtomPub post with unknown attention URI %s', $uri));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,6 @@ require_once INSTALLDIR . '/lib/apiauth.php';
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AtompubfavoritefeedAction extends ApiAuthAction
|
class AtompubfavoritefeedAction extends ApiAuthAction
|
||||||
{
|
{
|
||||||
private $_profile = null;
|
private $_profile = null;
|
||||||
|
@ -59,7 +58,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return boolean true
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($argarray)
|
function prepare($argarray)
|
||||||
{
|
{
|
||||||
parent::prepare($argarray);
|
parent::prepare($argarray);
|
||||||
|
@ -67,7 +65,8 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||||
$this->_profile = Profile::staticGet('id', $this->trimmed('profile'));
|
$this->_profile = Profile::staticGet('id', $this->trimmed('profile'));
|
||||||
|
|
||||||
if (empty($this->_profile)) {
|
if (empty($this->_profile)) {
|
||||||
throw new ClientException(_('No such profile'), 404);
|
// TRANS: Client exception thrown when requesting a favorite feed for a non-existing profile.
|
||||||
|
throw new ClientException(_('No such profile.'), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
$offset = ($this->page-1) * $this->count;
|
$offset = ($this->page-1) * $this->count;
|
||||||
|
@ -87,7 +86,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($argarray=null)
|
function handle($argarray=null)
|
||||||
{
|
{
|
||||||
parent::handle($argarray);
|
parent::handle($argarray);
|
||||||
|
@ -101,6 +99,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||||
$this->addFavorite();
|
$this->addFavorite();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
// TRANS: Client exception thrown when using an unsupported HTTP method.
|
||||||
throw new ClientException(_('HTTP method not supported.'), 405);
|
throw new ClientException(_('HTTP method not supported.'), 405);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -113,7 +112,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showFeed()
|
function showFeed()
|
||||||
{
|
{
|
||||||
header('Content-Type: application/atom+xml; charset=utf-8');
|
header('Content-Type: application/atom+xml; charset=utf-8');
|
||||||
|
@ -139,10 +137,14 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||||
$feed->addAuthor($this->_profile->getBestName(),
|
$feed->addAuthor($this->_profile->getBestName(),
|
||||||
$this->_profile->getURI());
|
$this->_profile->getURI());
|
||||||
|
|
||||||
|
// TRANS: Title for Atom favorites feed.
|
||||||
|
// TRANS: %s is a user nickname.
|
||||||
$feed->setTitle(sprintf(_("%s favorites"),
|
$feed->setTitle(sprintf(_("%s favorites"),
|
||||||
$this->_profile->getBestName()));
|
$this->_profile->getBestName()));
|
||||||
|
|
||||||
$feed->setSubtitle(sprintf(_("Notices %s has favorited to on %s"),
|
// TRANS: Subtitle for Atom favorites feed.
|
||||||
|
// TRANS: %1$s is a user nickname, %2$s is the StatusNet sitename.
|
||||||
|
$feed->setSubtitle(sprintf(_("Notices %1$s has favorited on %2$s"),
|
||||||
$this->_profile->getBestName(),
|
$this->_profile->getBestName(),
|
||||||
common_config('site', 'name')));
|
common_config('site', 'name')));
|
||||||
|
|
||||||
|
@ -205,15 +207,15 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function addFavorite()
|
function addFavorite()
|
||||||
{
|
{
|
||||||
// XXX: Refactor this; all the same for atompub
|
// XXX: Refactor this; all the same for atompub
|
||||||
|
|
||||||
if (empty($this->auth_user) ||
|
if (empty($this->auth_user) ||
|
||||||
$this->auth_user->id != $this->_profile->id) {
|
$this->auth_user->id != $this->_profile->id) {
|
||||||
throw new ClientException(_("Can't add someone else's".
|
// TRANS: Client exception thrown when trying to set a favorite for another user.
|
||||||
" subscription"), 403);
|
throw new ClientException(_("Cannot add someone else's".
|
||||||
|
" subscription."), 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
$xml = file_get_contents('php://input');
|
$xml = file_get_contents('php://input');
|
||||||
|
@ -234,9 +236,8 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||||
if (Event::handle('StartAtomPubNewActivity', array(&$activity))) {
|
if (Event::handle('StartAtomPubNewActivity', array(&$activity))) {
|
||||||
|
|
||||||
if ($activity->verb != ActivityVerb::FAVORITE) {
|
if ($activity->verb != ActivityVerb::FAVORITE) {
|
||||||
// TRANS: Client error displayed when not using the POST verb.
|
// TRANS: Client exception thrown when trying use an incorrect activity verb for the Atom pub method.
|
||||||
// TRANS: Do not translate POST.
|
throw new ClientException(_('Can only handle favorite activities.'));
|
||||||
throw new ClientException(_('Can only handle Favorite activities.'));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,6 +246,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||||
if (!in_array($note->type, array(ActivityObject::NOTE,
|
if (!in_array($note->type, array(ActivityObject::NOTE,
|
||||||
ActivityObject::BLOGENTRY,
|
ActivityObject::BLOGENTRY,
|
||||||
ActivityObject::STATUS))) {
|
ActivityObject::STATUS))) {
|
||||||
|
// TRANS: Client exception thrown when trying favorite an object that is not a notice.
|
||||||
throw new ClientException(_('Can only fave notices.'));
|
throw new ClientException(_('Can only fave notices.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -253,6 +255,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||||
|
|
||||||
if (empty($notice)) {
|
if (empty($notice)) {
|
||||||
// XXX: import from listed URL or something
|
// XXX: import from listed URL or something
|
||||||
|
// TRANS: Client exception thrown when trying favorite a notice without content.
|
||||||
throw new ClientException(_('Unknown note.'));
|
throw new ClientException(_('Unknown note.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,6 +263,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||||
'notice_id' => $notice->id));
|
'notice_id' => $notice->id));
|
||||||
|
|
||||||
if (!empty($old)) {
|
if (!empty($old)) {
|
||||||
|
// TRANS: Client exception thrown when trying favorite an already favorited notice.
|
||||||
throw new ClientException(_('Already a favorite.'));
|
throw new ClientException(_('Already a favorite.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,7 +300,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return boolean is read only action?
|
* @return boolean is read only action?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function isReadOnly($args)
|
function isReadOnly($args)
|
||||||
{
|
{
|
||||||
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
||||||
|
@ -328,7 +331,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return string etag http header
|
* @return string etag http header
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function etag()
|
function etag()
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
|
@ -339,7 +341,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return boolean true if delete, else false
|
* @return boolean true if delete, else false
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function requiresAuth()
|
function requiresAuth()
|
||||||
{
|
{
|
||||||
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
||||||
|
@ -359,7 +360,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function notify($fave, $notice, $user)
|
function notify($fave, $notice, $user)
|
||||||
{
|
{
|
||||||
$other = User::staticGet('id', $notice->profile_id);
|
$other = User::staticGet('id', $notice->profile_id);
|
||||||
|
|
|
@ -46,7 +46,6 @@ require_once INSTALLDIR . '/lib/apiauth.php';
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AtompubmembershipfeedAction extends ApiAuthAction
|
class AtompubmembershipfeedAction extends ApiAuthAction
|
||||||
{
|
{
|
||||||
private $_profile = null;
|
private $_profile = null;
|
||||||
|
@ -59,7 +58,6 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return boolean true
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($argarray)
|
function prepare($argarray)
|
||||||
{
|
{
|
||||||
parent::prepare($argarray);
|
parent::prepare($argarray);
|
||||||
|
@ -69,6 +67,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||||
$this->_profile = Profile::staticGet('id', $profileId);
|
$this->_profile = Profile::staticGet('id', $profileId);
|
||||||
|
|
||||||
if (empty($this->_profile)) {
|
if (empty($this->_profile)) {
|
||||||
|
// TRANS: Client exception.
|
||||||
throw new ClientException(_('No such profile.'), 404);
|
throw new ClientException(_('No such profile.'), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +88,6 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($argarray=null)
|
function handle($argarray=null)
|
||||||
{
|
{
|
||||||
parent::handle($argarray);
|
parent::handle($argarray);
|
||||||
|
@ -103,6 +101,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||||
$this->addMembership();
|
$this->addMembership();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
// TRANS: Client exception thrown when using an unsupported HTTP method.
|
||||||
throw new ClientException(_('HTTP method not supported.'), 405);
|
throw new ClientException(_('HTTP method not supported.'), 405);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -115,7 +114,6 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showFeed()
|
function showFeed()
|
||||||
{
|
{
|
||||||
header('Content-Type: application/atom+xml; charset=utf-8');
|
header('Content-Type: application/atom+xml; charset=utf-8');
|
||||||
|
@ -141,10 +139,14 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||||
$feed->addAuthor($this->_profile->getBestName(),
|
$feed->addAuthor($this->_profile->getBestName(),
|
||||||
$this->_profile->getURI());
|
$this->_profile->getURI());
|
||||||
|
|
||||||
|
// TRANS: Title for group membership feed.
|
||||||
|
// TRANS: %s is a username.
|
||||||
$feed->setTitle(sprintf(_("%s group memberships"),
|
$feed->setTitle(sprintf(_("%s group memberships"),
|
||||||
$this->_profile->getBestName()));
|
$this->_profile->getBestName()));
|
||||||
|
|
||||||
$feed->setSubtitle(sprintf(_("Groups %s is a member of on %s"),
|
// TRANS: Subtitle for group membership feed.
|
||||||
|
// TRANS: %1$s is a username, %2$s is the StatusNet sitename.
|
||||||
|
$feed->setSubtitle(sprintf(_("Groups %1$s is a member of on %2$s"),
|
||||||
$this->_profile->getBestName(),
|
$this->_profile->getBestName(),
|
||||||
common_config('site', 'name')));
|
common_config('site', 'name')));
|
||||||
|
|
||||||
|
@ -207,14 +209,14 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function addMembership()
|
function addMembership()
|
||||||
{
|
{
|
||||||
// XXX: Refactor this; all the same for atompub
|
// XXX: Refactor this; all the same for atompub
|
||||||
|
|
||||||
if (empty($this->auth_user) ||
|
if (empty($this->auth_user) ||
|
||||||
$this->auth_user->id != $this->_profile->id) {
|
$this->auth_user->id != $this->_profile->id) {
|
||||||
throw new ClientException(_("Can't add someone else's".
|
// TRANS: Client exception thrown when trying subscribe someone else to a group.
|
||||||
|
throw new ClientException(_("Cannot add someone else's".
|
||||||
" membership"), 403);
|
" membership"), 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,17 +236,17 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||||
$membership = null;
|
$membership = null;
|
||||||
|
|
||||||
if (Event::handle('StartAtomPubNewActivity', array(&$activity))) {
|
if (Event::handle('StartAtomPubNewActivity', array(&$activity))) {
|
||||||
|
|
||||||
if ($activity->verb != ActivityVerb::JOIN) {
|
if ($activity->verb != ActivityVerb::JOIN) {
|
||||||
// TRANS: Client error displayed when not using the POST verb.
|
// TRANS: Client error displayed when not using the POST verb.
|
||||||
// TRANS: Do not translate POST.
|
// TRANS: Do not translate POST.
|
||||||
throw new ClientException(_('Can only handle Join activities.'));
|
throw new ClientException(_('Can only handle join activities.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$groupObj = $activity->objects[0];
|
$groupObj = $activity->objects[0];
|
||||||
|
|
||||||
if ($groupObj->type != ActivityObject::GROUP) {
|
if ($groupObj->type != ActivityObject::GROUP) {
|
||||||
|
// TRANS: Client exception thrown when trying favorite an object that is not a notice.
|
||||||
throw new ClientException(_('Can only fave notices.'));
|
throw new ClientException(_('Can only fave notices.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -253,6 +255,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||||
|
|
||||||
if (empty($group)) {
|
if (empty($group)) {
|
||||||
// XXX: import from listed URL or something
|
// XXX: import from listed URL or something
|
||||||
|
// TRANS: Client exception thrown when trying to subscribe to a non-existing group.
|
||||||
throw new ClientException(_('Unknown group.'));
|
throw new ClientException(_('Unknown group.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,6 +263,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||||
'group_id' => $group->id));
|
'group_id' => $group->id));
|
||||||
|
|
||||||
if (!empty($old)) {
|
if (!empty($old)) {
|
||||||
|
// TRANS: Client exception thrown when trying to subscribe to an already subscribed group.
|
||||||
throw new ClientException(_('Already a member.'));
|
throw new ClientException(_('Already a member.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,6 +271,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||||
|
|
||||||
if (Group_block::isBlocked($group, $profile)) {
|
if (Group_block::isBlocked($group, $profile)) {
|
||||||
// XXX: import from listed URL or something
|
// XXX: import from listed URL or something
|
||||||
|
// TRANS: Client exception thrown when trying to subscribe to group while blocked from that group.
|
||||||
throw new ClientException(_('Blocked by admin.'));
|
throw new ClientException(_('Blocked by admin.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,7 +304,6 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return boolean is read only action?
|
* @return boolean is read only action?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function isReadOnly($args)
|
function isReadOnly($args)
|
||||||
{
|
{
|
||||||
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
||||||
|
@ -331,7 +335,6 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return string etag http header
|
* @return string etag http header
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function etag()
|
function etag()
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
|
@ -342,7 +345,6 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return boolean true if delete, else false
|
* @return boolean true if delete, else false
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function requiresAuth()
|
function requiresAuth()
|
||||||
{
|
{
|
||||||
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
||||||
|
|
|
@ -48,7 +48,6 @@ require_once INSTALLDIR . '/lib/apiauth.php';
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AtompubshowfavoriteAction extends ApiAuthAction
|
class AtompubshowfavoriteAction extends ApiAuthAction
|
||||||
{
|
{
|
||||||
private $_profile = null;
|
private $_profile = null;
|
||||||
|
@ -62,7 +61,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return boolean true
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($argarray)
|
function prepare($argarray)
|
||||||
{
|
{
|
||||||
parent::prepare($argarray);
|
parent::prepare($argarray);
|
||||||
|
@ -73,12 +71,14 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||||
$this->_profile = Profile::staticGet('id', $profileId);
|
$this->_profile = Profile::staticGet('id', $profileId);
|
||||||
|
|
||||||
if (empty($this->_profile)) {
|
if (empty($this->_profile)) {
|
||||||
|
// TRANS: Client exception.
|
||||||
throw new ClientException(_('No such profile.'), 404);
|
throw new ClientException(_('No such profile.'), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_notice = Notice::staticGet('id', $noticeId);
|
$this->_notice = Notice::staticGet('id', $noticeId);
|
||||||
|
|
||||||
if (empty($this->_notice)) {
|
if (empty($this->_notice)) {
|
||||||
|
// TRANS: Client exception thrown when referencing a non-existing notice.
|
||||||
throw new ClientException(_('No such notice.'), 404);
|
throw new ClientException(_('No such notice.'), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,6 +86,7 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||||
'notice_id' => $noticeId));
|
'notice_id' => $noticeId));
|
||||||
|
|
||||||
if (empty($this->_fave)) {
|
if (empty($this->_fave)) {
|
||||||
|
// TRANS: Client exception thrown when referencing a non-existing favorite.
|
||||||
throw new ClientException(_('No such favorite.'), 404);
|
throw new ClientException(_('No such favorite.'), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +100,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($argarray=null)
|
function handle($argarray=null)
|
||||||
{
|
{
|
||||||
parent::handle($argarray);
|
parent::handle($argarray);
|
||||||
|
@ -113,6 +113,7 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||||
$this->deleteFave();
|
$this->deleteFave();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
// TRANS: Client exception thrown using an unsupported HTTP method.
|
||||||
throw new ClientException(_('HTTP method not supported.'),
|
throw new ClientException(_('HTTP method not supported.'),
|
||||||
405);
|
405);
|
||||||
}
|
}
|
||||||
|
@ -124,7 +125,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showFave()
|
function showFave()
|
||||||
{
|
{
|
||||||
$activity = $this->_fave->asActivity();
|
$activity = $this->_fave->asActivity();
|
||||||
|
@ -143,12 +143,12 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function deleteFave()
|
function deleteFave()
|
||||||
{
|
{
|
||||||
if (empty($this->auth_user) ||
|
if (empty($this->auth_user) ||
|
||||||
$this->auth_user->id != $this->_profile->id) {
|
$this->auth_user->id != $this->_profile->id) {
|
||||||
throw new ClientException(_("Can't delete someone else's".
|
// TRANS: Client exception thrown when trying to remove a favorite notice of another user.
|
||||||
|
throw new ClientException(_("Cannot delete someone else's".
|
||||||
" favorite"), 403);
|
" favorite"), 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,7 +166,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return boolean is read only action?
|
* @return boolean is read only action?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function isReadOnly($args)
|
function isReadOnly($args)
|
||||||
{
|
{
|
||||||
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
||||||
|
@ -184,7 +183,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return string last modified http header
|
* @return string last modified http header
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function lastModified()
|
function lastModified()
|
||||||
{
|
{
|
||||||
return max(strtotime($this->_profile->modified),
|
return max(strtotime($this->_profile->modified),
|
||||||
|
@ -199,7 +197,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return string etag http header
|
* @return string etag http header
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function etag()
|
function etag()
|
||||||
{
|
{
|
||||||
$mtime = strtotime($this->_fave->modified);
|
$mtime = strtotime($this->_fave->modified);
|
||||||
|
@ -215,7 +212,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return boolean true if delete, else false
|
* @return boolean true if delete, else false
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function requiresAuth()
|
function requiresAuth()
|
||||||
{
|
{
|
||||||
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
||||||
|
|
|
@ -46,7 +46,6 @@ require_once INSTALLDIR . '/lib/apiauth.php';
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AtompubshowmembershipAction extends ApiAuthAction
|
class AtompubshowmembershipAction extends ApiAuthAction
|
||||||
{
|
{
|
||||||
private $_profile = null;
|
private $_profile = null;
|
||||||
|
@ -60,7 +59,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return boolean true
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($argarray)
|
function prepare($argarray)
|
||||||
{
|
{
|
||||||
parent::prepare($argarray);
|
parent::prepare($argarray);
|
||||||
|
@ -70,6 +68,7 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||||
$this->_profile = Profile::staticGet('id', $profileId);
|
$this->_profile = Profile::staticGet('id', $profileId);
|
||||||
|
|
||||||
if (empty($this->_profile)) {
|
if (empty($this->_profile)) {
|
||||||
|
// TRANS: Client exception.
|
||||||
throw new ClientException(_('No such profile.'), 404);
|
throw new ClientException(_('No such profile.'), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,6 +77,7 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||||
$this->_group = User_group::staticGet('id', $groupId);
|
$this->_group = User_group::staticGet('id', $groupId);
|
||||||
|
|
||||||
if (empty($this->_group)) {
|
if (empty($this->_group)) {
|
||||||
|
// TRANS: Client exception thrown when referencing a non-existing group.
|
||||||
throw new ClientException(_('No such group'), 404);
|
throw new ClientException(_('No such group'), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,6 +87,7 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||||
$this->_membership = Group_member::pkeyGet($kv);
|
$this->_membership = Group_member::pkeyGet($kv);
|
||||||
|
|
||||||
if (empty($this->_membership)) {
|
if (empty($this->_membership)) {
|
||||||
|
// TRANS: Client exception thrown when trying to show membership of a non-subscribed group
|
||||||
throw new ClientException(_('Not a member'), 404);
|
throw new ClientException(_('Not a member'), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +101,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($argarray=null)
|
function handle($argarray=null)
|
||||||
{
|
{
|
||||||
switch ($_SERVER['REQUEST_METHOD']) {
|
switch ($_SERVER['REQUEST_METHOD']) {
|
||||||
|
@ -112,7 +112,8 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||||
$this->deleteMembership();
|
$this->deleteMembership();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new ClientException(_('Method not supported'), 405);
|
// TRANS: Client exception thrown when using an unsupported HTTP method.
|
||||||
|
throw new ClientException(_('HTTP method not supported'), 405);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -123,7 +124,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showMembership()
|
function showMembership()
|
||||||
{
|
{
|
||||||
$activity = $this->_membership->asActivity();
|
$activity = $this->_membership->asActivity();
|
||||||
|
@ -147,7 +147,8 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||||
{
|
{
|
||||||
if (empty($this->auth_user) ||
|
if (empty($this->auth_user) ||
|
||||||
$this->auth_user->id != $this->_profile->id) {
|
$this->auth_user->id != $this->_profile->id) {
|
||||||
throw new ClientException(_("Can't delete someone else's".
|
// TRANS: Client exception thrown when deleting someone else's membership.
|
||||||
|
throw new ClientException(_("Cannot delete someone else's".
|
||||||
" membership"), 403);
|
" membership"), 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,7 +169,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return boolean is read only action?
|
* @return boolean is read only action?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function isReadOnly($args)
|
function isReadOnly($args)
|
||||||
{
|
{
|
||||||
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
||||||
|
@ -203,7 +203,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return string etag http header
|
* @return string etag http header
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function etag()
|
function etag()
|
||||||
{
|
{
|
||||||
$ctime = strtotime($this->_membership->created);
|
$ctime = strtotime($this->_membership->created);
|
||||||
|
@ -222,7 +221,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return boolean true if delete, else false
|
* @return boolean true if delete, else false
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function requiresAuth()
|
function requiresAuth()
|
||||||
{
|
{
|
||||||
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
||||||
|
|
|
@ -69,7 +69,7 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
|
||||||
if (empty($this->_subscriber)) {
|
if (empty($this->_subscriber)) {
|
||||||
// TRANS: Client exception thrown when trying to display a subscription for a non-existing profile ID.
|
// TRANS: Client exception thrown when trying to display a subscription for a non-existing profile ID.
|
||||||
// TRANS: %d is the non-existing profile ID number.
|
// TRANS: %d is the non-existing profile ID number.
|
||||||
throw new ClientException(sprintf(_('No such profile id: %d'),
|
throw new ClientException(sprintf(_('No such profile id: %d.'),
|
||||||
$subscriberId), 404);
|
$subscriberId), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
|
||||||
if (empty($this->_subscribed)) {
|
if (empty($this->_subscribed)) {
|
||||||
// TRANS: Client exception thrown when trying to display a subscription for a non-existing profile ID.
|
// TRANS: Client exception thrown when trying to display a subscription for a non-existing profile ID.
|
||||||
// TRANS: %d is the non-existing profile ID number.
|
// TRANS: %d is the non-existing profile ID number.
|
||||||
throw new ClientException(sprintf(_('No such profile id: %d'),
|
throw new ClientException(sprintf(_('No such profile id: %d.'),
|
||||||
$subscribedId), 404);
|
$subscribedId), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
|
||||||
if (empty($this->_subscription)) {
|
if (empty($this->_subscription)) {
|
||||||
// TRANS: Client exception thrown when trying to display a subscription for a non-subscribed profile ID.
|
// TRANS: Client exception thrown when trying to display a subscription for a non-subscribed profile ID.
|
||||||
// TRANS: %1$d is the non-existing subscriber ID number, $2$d is the ID of the profile that was not subscribed to.
|
// TRANS: %1$d is the non-existing subscriber ID number, $2$d is the ID of the profile that was not subscribed to.
|
||||||
$msg = sprintf(_('Profile %1$d not subscribed to profile %2$d'),
|
$msg = sprintf(_('Profile %1$d not subscribed to profile %2$d.'),
|
||||||
$subscriberId, $subscribedId);
|
$subscriberId, $subscribedId);
|
||||||
throw new ClientException($msg, 404);
|
throw new ClientException($msg, 404);
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
|
||||||
$this->auth_user->id != $this->_subscriber->id) {
|
$this->auth_user->id != $this->_subscriber->id) {
|
||||||
// TRANS: Client exception thrown when trying to delete a subscription of another user.
|
// TRANS: Client exception thrown when trying to delete a subscription of another user.
|
||||||
throw new ClientException(_("Cannot delete someone else's ".
|
throw new ClientException(_("Cannot delete someone else's ".
|
||||||
"subscription"), 403);
|
"subscription."), 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
Subscription::cancel($this->_subscriber,
|
Subscription::cancel($this->_subscriber,
|
||||||
|
|
|
@ -48,7 +48,6 @@ require_once INSTALLDIR . '/lib/apiauth.php';
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AtompubsubscriptionfeedAction extends ApiAuthAction
|
class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||||
{
|
{
|
||||||
private $_profile = null;
|
private $_profile = null;
|
||||||
|
@ -61,7 +60,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return boolean true
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($argarray)
|
function prepare($argarray)
|
||||||
{
|
{
|
||||||
parent::prepare($argarray);
|
parent::prepare($argarray);
|
||||||
|
@ -71,7 +69,9 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||||
$this->_profile = Profile::staticGet('id', $subscriber);
|
$this->_profile = Profile::staticGet('id', $subscriber);
|
||||||
|
|
||||||
if (empty($this->_profile)) {
|
if (empty($this->_profile)) {
|
||||||
throw new ClientException(sprintf(_('No such profile id: %d'),
|
// TRANS: Client exception thrown when trying to display a subscription for a non-existing profile ID.
|
||||||
|
// TRANS: %d is the non-existing profile ID number.
|
||||||
|
throw new ClientException(sprintf(_('No such profile id: %d.'),
|
||||||
$subscriber), 404);
|
$subscriber), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($argarray=null)
|
function handle($argarray=null)
|
||||||
{
|
{
|
||||||
parent::handle($argarray);
|
parent::handle($argarray);
|
||||||
|
@ -106,6 +105,7 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||||
$this->addSubscription();
|
$this->addSubscription();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
// TRANS: Client exception thrown when using an unsupported HTTP method.
|
||||||
$this->clientError(_('HTTP method not supported.'), 405);
|
$this->clientError(_('HTTP method not supported.'), 405);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showFeed()
|
function showFeed()
|
||||||
{
|
{
|
||||||
header('Content-Type: application/atom+xml; charset=utf-8');
|
header('Content-Type: application/atom+xml; charset=utf-8');
|
||||||
|
@ -144,10 +143,14 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||||
$feed->addAuthor($this->_profile->getBestName(),
|
$feed->addAuthor($this->_profile->getBestName(),
|
||||||
$this->_profile->getURI());
|
$this->_profile->getURI());
|
||||||
|
|
||||||
|
// TRANS: Title for Atom subscription feed.
|
||||||
|
// TRANS: %s is a user nickname.
|
||||||
$feed->setTitle(sprintf(_("%s subscriptions"),
|
$feed->setTitle(sprintf(_("%s subscriptions"),
|
||||||
$this->_profile->getBestName()));
|
$this->_profile->getBestName()));
|
||||||
|
|
||||||
$feed->setSubtitle(sprintf(_("People %s has subscribed to on %s"),
|
// TRANS: Subtitle for Atom subscription feed.
|
||||||
|
// TRANS: %1$s is a user nickname, %s$s is the StatusNet sitename.
|
||||||
|
$feed->setSubtitle(sprintf(_("People %1$s has subscribed to on %2$s"),
|
||||||
$this->_profile->getBestName(),
|
$this->_profile->getBestName(),
|
||||||
common_config('site', 'name')));
|
common_config('site', 'name')));
|
||||||
|
|
||||||
|
@ -214,13 +217,13 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function addSubscription()
|
function addSubscription()
|
||||||
{
|
{
|
||||||
if (empty($this->auth_user) ||
|
if (empty($this->auth_user) ||
|
||||||
$this->auth_user->id != $this->_profile->id) {
|
$this->auth_user->id != $this->_profile->id) {
|
||||||
throw new ClientException(_("Can't add someone else's".
|
// TRANS: Client exception thrown when trying to subscribe another user.
|
||||||
" subscription"), 403);
|
throw new ClientException(_("Cannot add someone else's".
|
||||||
|
" subscription."), 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
$xml = file_get_contents('php://input');
|
$xml = file_get_contents('php://input');
|
||||||
|
@ -250,6 +253,7 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||||
$person = $activity->objects[0];
|
$person = $activity->objects[0];
|
||||||
|
|
||||||
if ($person->type != ActivityObject::PERSON) {
|
if ($person->type != ActivityObject::PERSON) {
|
||||||
|
// TRANS: Client exception thrown when subscribing to an object that is not a person.
|
||||||
$this->clientError(_('Can only follow people.'));
|
$this->clientError(_('Can only follow people.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -259,7 +263,8 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||||
$profile = Profile::fromURI($person->id);
|
$profile = Profile::fromURI($person->id);
|
||||||
|
|
||||||
if (empty($profile)) {
|
if (empty($profile)) {
|
||||||
$this->clientError(sprintf(_('Unknown profile %s'), $person->id));
|
// TRANS: Client exception thrown when subscribing to a non-existing profile.
|
||||||
|
$this->clientError(sprintf(_('Unknown profile %s.'), $person->id));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,7 +303,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return boolean is read only action?
|
* @return boolean is read only action?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function isReadOnly($args)
|
function isReadOnly($args)
|
||||||
{
|
{
|
||||||
return $_SERVER['REQUEST_METHOD'] != 'POST';
|
return $_SERVER['REQUEST_METHOD'] != 'POST';
|
||||||
|
@ -309,7 +313,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return string last modified http header
|
* @return string last modified http header
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function lastModified()
|
function lastModified()
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
|
@ -320,7 +323,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return string etag http header
|
* @return string etag http header
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function etag()
|
function etag()
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
|
@ -331,7 +333,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||||
*
|
*
|
||||||
* @return boolean true if delete, else false
|
* @return boolean true if delete, else false
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function requiresAuth()
|
function requiresAuth()
|
||||||
{
|
{
|
||||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
|
|
|
@ -115,7 +115,7 @@ class ConfirmaddressAction extends Action
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log_db_error($cur, 'UPDATE', __FILE__);
|
common_log_db_error($cur, 'UPDATE', __FILE__);
|
||||||
// TRANS: Server error displayed when a user update to the database fails in the contact address confirmation action.
|
// TRANS: Server error displayed when a user update to the database fails in the contact address confirmation action.
|
||||||
$this->serverError(_('Couldn\'t update user.'));
|
$this->serverError(_('Could not update user.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,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.
|
// 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(_('Cannot delete this notice.'));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
// XXX: Ajax!
|
// XXX: Ajax!
|
||||||
|
|
|
@ -356,7 +356,7 @@ class EmailsettingsAction 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 thrown on database error updating e-mail preferences.
|
// TRANS: Server error thrown on database error updating e-mail preferences.
|
||||||
$this->serverError(_('Couldn\'t update user.'));
|
$this->serverError(_('Could not update user.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -423,7 +423,7 @@ class EmailsettingsAction extends AccountSettingsAction
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
common_log_db_error($confirm, 'INSERT', __FILE__);
|
common_log_db_error($confirm, 'INSERT', __FILE__);
|
||||||
// TRANS: Server error thrown on database error adding e-mail confirmation code.
|
// TRANS: Server error thrown on database error adding e-mail confirmation code.
|
||||||
$this->serverError(_('Couldn\'t insert confirmation code.'));
|
$this->serverError(_('Could not insert confirmation code.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -465,7 +465,7 @@ class EmailsettingsAction extends AccountSettingsAction
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log_db_error($confirm, 'DELETE', __FILE__);
|
common_log_db_error($confirm, 'DELETE', __FILE__);
|
||||||
// TRANS: Server error thrown on database error canceling e-mail address confirmation.
|
// TRANS: Server error thrown on database error canceling e-mail address confirmation.
|
||||||
$this->serverError(_('Couldn\'t delete email confirmation.'));
|
$this->serverError(_('Could not delete email confirmation.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -505,7 +505,7 @@ class EmailsettingsAction extends AccountSettingsAction
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||||
// TRANS: Server error thrown on database error removing a registered e-mail address.
|
// TRANS: Server error thrown on database error removing a registered e-mail address.
|
||||||
$this->serverError(_('Couldn\'t update user.'));
|
$this->serverError(_('Could not update user.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$user->query('COMMIT');
|
$user->query('COMMIT');
|
||||||
|
@ -537,7 +537,7 @@ class EmailsettingsAction extends AccountSettingsAction
|
||||||
if (!$user->updateKeys($orig)) {
|
if (!$user->updateKeys($orig)) {
|
||||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||||
// TRANS: Server error thrown on database error removing incoming e-mail address.
|
// TRANS: Server error thrown on database error removing incoming e-mail address.
|
||||||
$this->serverError(_("Couldn't update user record."));
|
$this->serverError(_("Could not update user record."));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TRANS: Message given after successfully removing an incoming e-mail address.
|
// TRANS: Message given after successfully removing an incoming e-mail address.
|
||||||
|
@ -562,7 +562,7 @@ class EmailsettingsAction extends AccountSettingsAction
|
||||||
if (!$user->updateKeys($orig)) {
|
if (!$user->updateKeys($orig)) {
|
||||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||||
// TRANS: Server error thrown on database error adding incoming e-mail address.
|
// TRANS: Server error thrown on database error adding incoming e-mail address.
|
||||||
$this->serverError(_("Couldn't update user record."));
|
$this->serverError(_("Could not update user record."));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TRANS: Message given after successfully adding an incoming e-mail address.
|
// TRANS: Message given after successfully adding an incoming e-mail address.
|
||||||
|
|
|
@ -263,7 +263,7 @@ class GroupDesignSettingsAction extends DesignSettingsAction
|
||||||
|
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
common_log_db_error($design, 'UPDATE', __FILE__);
|
common_log_db_error($design, 'UPDATE', __FILE__);
|
||||||
$this->showForm(_('Couldn\'t update your design.'));
|
$this->showForm(_('Could not update your design.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 GrouplogoAction extends GroupDesignAction
|
class GrouplogoAction extends GroupDesignAction
|
||||||
{
|
{
|
||||||
var $mode = null;
|
var $mode = null;
|
||||||
|
@ -67,6 +66,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
|
|
||||||
if (!common_logged_in()) {
|
if (!common_logged_in()) {
|
||||||
|
// TRANS: Client error displayed when 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;
|
||||||
}
|
}
|
||||||
|
@ -83,6 +83,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$nickname) {
|
if (!$nickname) {
|
||||||
|
// TRANS: Client error displayed when trying to change group logo settings without having a nickname.
|
||||||
$this->clientError(_('No nickname.'), 404);
|
$this->clientError(_('No nickname.'), 404);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -99,6 +100,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->group) {
|
if (!$this->group) {
|
||||||
|
// TRANS: Client error displayed when trying to update logo settings for a non-existing group.
|
||||||
$this->clientError(_('No such group.'), 404);
|
$this->clientError(_('No such group.'), 404);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -106,6 +108,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
$cur = common_current_user();
|
$cur = common_current_user();
|
||||||
|
|
||||||
if (!$cur->isAdmin($this->group)) {
|
if (!$cur->isAdmin($this->group)) {
|
||||||
|
// TRANS: Client error displayed when trying to change group logo settings 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;
|
||||||
}
|
}
|
||||||
|
@ -136,9 +139,9 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return string Title of the page
|
* @return string Title of the page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
|
// TRANS: Title for group logo settings page.
|
||||||
return _('Group logo');
|
return _('Group logo');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,9 +150,10 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return instructions for use
|
* @return instructions for use
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
|
// TRANS: Instructions for group logo page.
|
||||||
|
// TRANS: %s is the maximum file size for that site.
|
||||||
return sprintf(_('You can upload a logo image for your group. The maximum file size is %s.'), ImageFile::maxFileSize());
|
return sprintf(_('You can upload a logo image for your group. The maximum file size is %s.'), ImageFile::maxFileSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +164,6 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
if ($this->mode == 'crop') {
|
if ($this->mode == 'crop') {
|
||||||
|
@ -178,6 +181,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
|
|
||||||
if (!$profile) {
|
if (!$profile) {
|
||||||
common_log_db_error($user, 'SELECT', __FILE__);
|
common_log_db_error($user, 'SELECT', __FILE__);
|
||||||
|
// TRANS: Server error displayed coming across a request from a user without a profile.
|
||||||
$this->serverError(_('User without matching profile.'));
|
$this->serverError(_('User without matching profile.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -192,6 +196,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
common_local_url('grouplogo',
|
common_local_url('grouplogo',
|
||||||
array('nickname' => $this->group->nickname))));
|
array('nickname' => $this->group->nickname))));
|
||||||
$this->elementStart('fieldset');
|
$this->elementStart('fieldset');
|
||||||
|
// TRANS: Group logo form legend.
|
||||||
$this->element('legend', null, _('Group logo'));
|
$this->element('legend', null, _('Group logo'));
|
||||||
$this->hidden('token', common_session_token());
|
$this->hidden('token', common_session_token());
|
||||||
|
|
||||||
|
@ -199,6 +204,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
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: Uploaded original file in group logo form.
|
||||||
$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' => $this->group->original_logo,
|
$this->element('img', array('src' => $this->group->original_logo,
|
||||||
|
@ -210,6 +216,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
if ($this->group->homepage_logo) {
|
if ($this->group->homepage_logo) {
|
||||||
$this->elementStart('li', array('id' => 'avatar_preview',
|
$this->elementStart('li', array('id' => 'avatar_preview',
|
||||||
'class' => 'avatar_view'));
|
'class' => 'avatar_view'));
|
||||||
|
// TRANS: Header for preview of to be displayed group logo.
|
||||||
$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' => $this->group->homepage_logo,
|
$this->element('img', array('src' => $this->group->homepage_logo,
|
||||||
|
@ -233,6 +240,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
|
|
||||||
$this->elementStart('ul', 'form_actions');
|
$this->elementStart('ul', 'form_actions');
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
|
// TRANS: Submit button for uploading a group logo.
|
||||||
$this->submit('upload', _('Upload'));
|
$this->submit('upload', _('Upload'));
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementEnd('ul');
|
$this->elementEnd('ul');
|
||||||
|
@ -251,6 +259,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
common_local_url('grouplogo',
|
common_local_url('grouplogo',
|
||||||
array('nickname' => $this->group->nickname))));
|
array('nickname' => $this->group->nickname))));
|
||||||
$this->elementStart('fieldset');
|
$this->elementStart('fieldset');
|
||||||
|
// TRANS: Legend for group logo settings fieldset.
|
||||||
$this->element('legend', null, _('Avatar settings'));
|
$this->element('legend', null, _('Avatar settings'));
|
||||||
$this->hidden('token', common_session_token());
|
$this->hidden('token', common_session_token());
|
||||||
|
|
||||||
|
@ -259,6 +268,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
$this->elementStart('li',
|
$this->elementStart('li',
|
||||||
array('id' => 'avatar_original',
|
array('id' => 'avatar_original',
|
||||||
'class' => 'avatar_view'));
|
'class' => 'avatar_view'));
|
||||||
|
// TRANS: Header for originally uploaded file before a crop on the group logo page.
|
||||||
$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']),
|
||||||
|
@ -271,6 +281,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
$this->elementStart('li',
|
$this->elementStart('li',
|
||||||
array('id' => 'avatar_preview',
|
array('id' => 'avatar_preview',
|
||||||
'class' => 'avatar_view'));
|
'class' => 'avatar_view'));
|
||||||
|
// TRANS: Header for the cropped group logo on the group logo page.
|
||||||
$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']),
|
||||||
|
@ -286,6 +297,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
'id' => $crop_info));
|
'id' => $crop_info));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TRANS: Button text for cropping an uploaded group logo.
|
||||||
$this->submit('crop', _('Crop'));
|
$this->submit('crop', _('Crop'));
|
||||||
|
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
|
@ -302,13 +314,13 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handlePost()
|
function handlePost()
|
||||||
{
|
{
|
||||||
// CSRF protection
|
// CSRF protection
|
||||||
|
|
||||||
$token = $this->trimmed('token');
|
$token = $this->trimmed('token');
|
||||||
if (!$token || $token != common_session_token()) {
|
if (!$token || $token != common_session_token()) {
|
||||||
|
// TRANS: Form validation error message.
|
||||||
$this->show_form(_('There was a problem with your session token. '.
|
$this->show_form(_('There was a problem with your session token. '.
|
||||||
'Try again, please.'));
|
'Try again, please.'));
|
||||||
return;
|
return;
|
||||||
|
@ -319,6 +331,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
} else if ($this->arg('crop')) {
|
} else if ($this->arg('crop')) {
|
||||||
$this->cropLogo();
|
$this->cropLogo();
|
||||||
} else {
|
} else {
|
||||||
|
// TRANS: Form validation error message when an unsupported argument is used.
|
||||||
$this->showForm(_('Unexpected form submission.'));
|
$this->showForm(_('Unexpected form submission.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -331,7 +344,6 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function uploadLogo()
|
function uploadLogo()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
@ -362,6 +374,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
|
|
||||||
$this->mode = 'crop';
|
$this->mode = 'crop';
|
||||||
|
|
||||||
|
// TRANS: Form instructions on the group logo page.
|
||||||
$this->showForm(_('Pick a square area of the image to be the logo.'),
|
$this->showForm(_('Pick a square area of the image to be the logo.'),
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
|
@ -371,12 +384,12 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function cropLogo()
|
function cropLogo()
|
||||||
{
|
{
|
||||||
$filedata = $_SESSION['FILEDATA'];
|
$filedata = $_SESSION['FILEDATA'];
|
||||||
|
|
||||||
if (!$filedata) {
|
if (!$filedata) {
|
||||||
|
// TRANS: Server error displayed trying to crop an uploaded group logo that is no longer present.
|
||||||
$this->serverError(_('Lost our file data.'));
|
$this->serverError(_('Lost our file data.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -396,8 +409,10 @@ class GrouplogoAction extends GroupDesignAction
|
||||||
@unlink($filedata['filepath']);
|
@unlink($filedata['filepath']);
|
||||||
unset($_SESSION['FILEDATA']);
|
unset($_SESSION['FILEDATA']);
|
||||||
$this->mode = 'upload';
|
$this->mode = 'upload';
|
||||||
|
// TRANS: Form success message after updating a group logo.
|
||||||
$this->showForm(_('Logo updated.'), true);
|
$this->showForm(_('Logo updated.'), true);
|
||||||
} else {
|
} else {
|
||||||
|
// TRANS: Form failure message after failing to update a group logo.
|
||||||
$this->showForm(_('Failed updating logo.'));
|
$this->showForm(_('Failed updating logo.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,6 @@ require_once INSTALLDIR.'/lib/jabber.php';
|
||||||
*
|
*
|
||||||
* @see SettingsAction
|
* @see SettingsAction
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ImsettingsAction extends ConnectSettingsAction
|
class ImsettingsAction extends ConnectSettingsAction
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -53,7 +52,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return string Title of the page
|
* @return string Title of the page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
// TRANS: Title for instance messaging settings.
|
// TRANS: Title for instance messaging settings.
|
||||||
|
@ -65,7 +63,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return instructions for use
|
* @return instructions for use
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
// TRANS: Instant messaging settings page instructions.
|
// TRANS: Instant messaging settings page instructions.
|
||||||
|
@ -85,7 +82,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
if (!common_config('xmpp', 'enabled')) {
|
if (!common_config('xmpp', 'enabled')) {
|
||||||
|
@ -194,7 +190,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return Confirm_address address object for this user
|
* @return Confirm_address address object for this user
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getConfirmation()
|
function getConfirmation()
|
||||||
{
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
@ -221,7 +216,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handlePost()
|
function handlePost()
|
||||||
{
|
{
|
||||||
// CSRF protection
|
// CSRF protection
|
||||||
|
@ -254,7 +248,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function savePreferences()
|
function savePreferences()
|
||||||
{
|
{
|
||||||
$jabbernotify = $this->boolean('jabbernotify');
|
$jabbernotify = $this->boolean('jabbernotify');
|
||||||
|
@ -280,7 +273,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||||
// TRANS: Server error thrown on database error updating IM preferences.
|
// TRANS: Server error thrown on database error updating IM preferences.
|
||||||
$this->serverError(_('Couldn\'t update user.'));
|
$this->serverError(_('Could not update user.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,7 +291,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function addAddress()
|
function addAddress()
|
||||||
{
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
@ -348,7 +340,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
common_log_db_error($confirm, 'INSERT', __FILE__);
|
common_log_db_error($confirm, 'INSERT', __FILE__);
|
||||||
// TRANS: Server error thrown on database error adding IM confirmation code.
|
// TRANS: Server error thrown on database error adding IM confirmation code.
|
||||||
$this->serverError(_('Couldn\'t insert confirmation code.'));
|
$this->serverError(_('Could not insert confirmation code.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -374,7 +366,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function cancelConfirmation()
|
function cancelConfirmation()
|
||||||
{
|
{
|
||||||
$jabber = $this->arg('jabber');
|
$jabber = $this->arg('jabber');
|
||||||
|
@ -397,7 +388,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log_db_error($confirm, 'DELETE', __FILE__);
|
common_log_db_error($confirm, 'DELETE', __FILE__);
|
||||||
// TRANS: Server error thrown on database error canceling IM address confirmation.
|
// TRANS: Server error thrown on database error canceling IM address confirmation.
|
||||||
$this->serverError(_('Couldn\'t delete IM confirmation.'));
|
$this->serverError(_('Could not delete IM confirmation.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -412,7 +403,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function removeAddress()
|
function removeAddress()
|
||||||
{
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
@ -439,7 +429,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||||
// TRANS: Server error thrown on database error removing a registered IM address.
|
// TRANS: Server error thrown on database error removing a registered IM address.
|
||||||
$this->serverError(_('Couldn\'t update user.'));
|
$this->serverError(_('Could not update user.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$user->query('COMMIT');
|
$user->query('COMMIT');
|
||||||
|
@ -459,7 +449,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return boolean whether the Jabber ID exists
|
* @return boolean whether the Jabber ID exists
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function jabberExists($jabber)
|
function jabberExists($jabber)
|
||||||
{
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
|
|
@ -40,7 +40,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 LicenseadminpanelAction extends AdminPanelAction
|
class LicenseadminpanelAction extends AdminPanelAction
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -61,7 +60,6 @@ class LicenseadminpanelAction extends AdminPanelAction
|
||||||
*
|
*
|
||||||
* @return string instructions
|
* @return string instructions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
return _('License for this StatusNet site');
|
return _('License for this StatusNet site');
|
||||||
|
@ -72,7 +70,6 @@ class LicenseadminpanelAction extends AdminPanelAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showForm()
|
function showForm()
|
||||||
{
|
{
|
||||||
$form = new LicenseAdminPanelForm($this);
|
$form = new LicenseAdminPanelForm($this);
|
||||||
|
@ -85,7 +82,6 @@ class LicenseadminpanelAction extends AdminPanelAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function saveSettings()
|
function saveSettings()
|
||||||
{
|
{
|
||||||
static $settings = array(
|
static $settings = array(
|
||||||
|
@ -128,7 +124,6 @@ class LicenseadminpanelAction extends AdminPanelAction
|
||||||
*
|
*
|
||||||
* @return nothing
|
* @return nothing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function validate(&$values)
|
function validate(&$values)
|
||||||
{
|
{
|
||||||
// Validate license type (shouldn't have to do it, but just in case)
|
// Validate license type (shouldn't have to do it, but just in case)
|
||||||
|
@ -197,7 +192,6 @@ class LicenseAdminPanelForm extends AdminForm
|
||||||
*
|
*
|
||||||
* @return int ID of the form
|
* @return int ID of the form
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function id()
|
function id()
|
||||||
{
|
{
|
||||||
return 'licenseadminpanel';
|
return 'licenseadminpanel';
|
||||||
|
@ -208,7 +202,6 @@ class LicenseAdminPanelForm extends AdminForm
|
||||||
*
|
*
|
||||||
* @return string class of the form
|
* @return string class of the form
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formClass()
|
function formClass()
|
||||||
{
|
{
|
||||||
return 'form_settings';
|
return 'form_settings';
|
||||||
|
@ -312,7 +305,6 @@ class LicenseAdminPanelForm extends AdminForm
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formActions()
|
function formActions()
|
||||||
{
|
{
|
||||||
$this->out->submit(
|
$this->out->submit(
|
||||||
|
|
|
@ -181,7 +181,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.
|
// 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(_('Could not update user.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 ProfilesettingsAction extends AccountSettingsAction
|
class ProfilesettingsAction extends AccountSettingsAction
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -54,7 +53,6 @@ class ProfilesettingsAction extends AccountSettingsAction
|
||||||
*
|
*
|
||||||
* @return string Title of the page
|
* @return string Title of the page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
// TRANS: Page title for profile settings.
|
// TRANS: Page title for profile settings.
|
||||||
|
@ -66,7 +64,6 @@ class ProfilesettingsAction extends AccountSettingsAction
|
||||||
*
|
*
|
||||||
* @return instructions for use
|
* @return instructions for use
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
// TRANS: Usage instructions for profile settings.
|
// TRANS: Usage instructions for profile settings.
|
||||||
|
@ -87,7 +84,6 @@ class ProfilesettingsAction extends AccountSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
@ -212,7 +208,6 @@ class ProfilesettingsAction extends AccountSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handlePost()
|
function handlePost()
|
||||||
{
|
{
|
||||||
// CSRF protection
|
// CSRF protection
|
||||||
|
@ -323,7 +318,7 @@ class ProfilesettingsAction 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 thrown when user profile settings could not be updated.
|
// TRANS: Server error thrown when user profile settings could not be updated.
|
||||||
$this->serverError(_('Couldn\'t update user.'));
|
$this->serverError(_('Could not update user.'));
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
// Re-initialize language environment if it changed
|
// Re-initialize language environment if it changed
|
||||||
|
@ -348,7 +343,7 @@ class ProfilesettingsAction extends AccountSettingsAction
|
||||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||||
// TRANS: Server error thrown when user profile settings could not be updated to
|
// TRANS: Server error thrown when user profile settings could not be updated to
|
||||||
// TRANS: automatically subscribe to any subscriber.
|
// TRANS: automatically subscribe to any subscriber.
|
||||||
$this->serverError(_('Couldn\'t update user for autosubscribe.'));
|
$this->serverError(_('Could not update user for autosubscribe.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -406,7 +401,7 @@ class ProfilesettingsAction extends AccountSettingsAction
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
common_log_db_error($prefs, ($exists) ? 'UPDATE' : 'INSERT', __FILE__);
|
common_log_db_error($prefs, ($exists) ? 'UPDATE' : 'INSERT', __FILE__);
|
||||||
// TRANS: Server error thrown when user profile location preference settings could not be updated.
|
// TRANS: Server error thrown when user profile location preference settings could not be updated.
|
||||||
$this->serverError(_('Couldn\'t save location prefs.'));
|
$this->serverError(_('Could not save location prefs.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -419,7 +414,7 @@ class ProfilesettingsAction extends AccountSettingsAction
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
common_log_db_error($profile, 'UPDATE', __FILE__);
|
common_log_db_error($profile, 'UPDATE', __FILE__);
|
||||||
// TRANS: Server error thrown when user profile settings could not be saved.
|
// TRANS: Server error thrown when user profile settings could not be saved.
|
||||||
$this->serverError(_('Couldn\'t save profile.'));
|
$this->serverError(_('Could not save profile.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -428,7 +423,7 @@ class ProfilesettingsAction extends AccountSettingsAction
|
||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
// TRANS: Server error thrown when user profile settings tags could not be saved.
|
// TRANS: Server error thrown when user profile settings tags could not be saved.
|
||||||
$this->serverError(_('Couldn\'t save tags.'));
|
$this->serverError(_('Could not save tags.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,6 @@ require_once INSTALLDIR.'/extlib/libomb/profile.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 RemotesubscribeAction extends Action
|
class RemotesubscribeAction extends Action
|
||||||
{
|
{
|
||||||
var $nickname;
|
var $nickname;
|
||||||
|
@ -173,14 +172,14 @@ class RemotesubscribeAction extends Action
|
||||||
if ($service->getServiceURI(OAUTH_ENDPOINT_REQUEST) ==
|
if ($service->getServiceURI(OAUTH_ENDPOINT_REQUEST) ==
|
||||||
common_local_url('requesttoken') ||
|
common_local_url('requesttoken') ||
|
||||||
User::staticGet('uri', $service->getRemoteUserURI())) {
|
User::staticGet('uri', $service->getRemoteUserURI())) {
|
||||||
$this->showForm(_('That’s a local profile! Login to subscribe.'));
|
$this->showForm(_('That is a local profile! Login to subscribe.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$service->requestToken();
|
$service->requestToken();
|
||||||
} catch (OMB_RemoteServiceException $e) {
|
} catch (OMB_RemoteServiceException $e) {
|
||||||
$this->showForm(_('Couldn’t get a request token.'));
|
$this->showForm(_('Could not get a request token.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,4 +203,3 @@ class RemotesubscribeAction extends Action
|
||||||
common_redirect($target_url, 303);
|
common_redirect($target_url, 303);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
|
@ -41,7 +41,6 @@ if (!defined('STATUSNET')) {
|
||||||
* @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 RepeatAction extends Action
|
class RepeatAction extends Action
|
||||||
{
|
{
|
||||||
var $user = null;
|
var $user = null;
|
||||||
|
@ -73,7 +72,7 @@ class RepeatAction extends Action
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->user->id == $this->notice->profile_id) {
|
if ($this->user->id == $this->notice->profile_id) {
|
||||||
$this->clientError(_("You can't repeat your own notice."));
|
$this->clientError(_("You cannot repeat your own notice."));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +100,6 @@ class RepeatAction extends Action
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
$repeat = $this->notice->repeat($this->user->id, 'web');
|
$repeat = $this->notice->repeat($this->user->id, 'web');
|
||||||
|
|
|
@ -44,7 +44,6 @@ require_once INSTALLDIR.'/lib/connectsettingsaction.php';
|
||||||
*
|
*
|
||||||
* @see SettingsAction
|
* @see SettingsAction
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class SmssettingsAction extends ConnectSettingsAction
|
class SmssettingsAction extends ConnectSettingsAction
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -52,7 +51,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return string Title of the page
|
* @return string Title of the page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
// TRANS: Title for SMS settings.
|
// TRANS: Title for SMS settings.
|
||||||
|
@ -64,7 +62,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return instructions for use
|
* @return instructions for use
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
// XXX: For consistency of parameters in messages, this should be a
|
// XXX: For consistency of parameters in messages, this should be a
|
||||||
|
@ -88,7 +85,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
if (!common_config('sms', 'enabled')) {
|
if (!common_config('sms', 'enabled')) {
|
||||||
|
@ -219,7 +215,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @todo very similar to EmailsettingsAction::getConfirmation(); refactor?
|
* @todo very similar to EmailsettingsAction::getConfirmation(); refactor?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getConfirmation()
|
function getConfirmation()
|
||||||
{
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
@ -246,7 +241,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handlePost()
|
function handlePost()
|
||||||
{
|
{
|
||||||
// CSRF protection
|
// CSRF protection
|
||||||
|
@ -285,7 +279,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function savePreferences()
|
function savePreferences()
|
||||||
{
|
{
|
||||||
$smsnotify = $this->boolean('smsnotify');
|
$smsnotify = $this->boolean('smsnotify');
|
||||||
|
@ -305,7 +298,7 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||||
// TRANS: Server error thrown on database error updating SMS preferences.
|
// TRANS: Server error thrown on database error updating SMS preferences.
|
||||||
$this->serverError(_('Couldn\'t update user.'));
|
$this->serverError(_('Could not update user.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,7 +316,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function addAddress()
|
function addAddress()
|
||||||
{
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
@ -370,7 +362,7 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
common_log_db_error($confirm, 'INSERT', __FILE__);
|
common_log_db_error($confirm, 'INSERT', __FILE__);
|
||||||
// TRANS: Server error thrown on database error adding SMS confirmation code.
|
// TRANS: Server error thrown on database error adding SMS confirmation code.
|
||||||
$this->serverError(_('Couldn\'t insert confirmation code.'));
|
$this->serverError(_('Could not insert confirmation code.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -395,7 +387,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function cancelConfirmation()
|
function cancelConfirmation()
|
||||||
{
|
{
|
||||||
$sms = $this->trimmed('sms');
|
$sms = $this->trimmed('sms');
|
||||||
|
@ -419,7 +410,7 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log_db_error($confirm, 'DELETE', __FILE__);
|
common_log_db_error($confirm, 'DELETE', __FILE__);
|
||||||
// TRANS: Server error thrown on database error canceling SMS phone number confirmation.
|
// TRANS: Server error thrown on database error canceling SMS phone number confirmation.
|
||||||
$this->serverError(_('Couldn\'t delete email confirmation.'));
|
$this->serverError(_('Could not delete email confirmation.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -432,7 +423,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function removeAddress()
|
function removeAddress()
|
||||||
{
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
@ -461,7 +451,7 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||||
// TRANS: Server error thrown on database error removing a registered SMS phone number.
|
// TRANS: Server error thrown on database error removing a registered SMS phone number.
|
||||||
$this->serverError(_('Couldn\'t update user.'));
|
$this->serverError(_('Could not update user.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$user->query('COMMIT');
|
$user->query('COMMIT');
|
||||||
|
@ -479,7 +469,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return boolean does the number exist
|
* @return boolean does the number exist
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function smsExists($sms)
|
function smsExists($sms)
|
||||||
{
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
@ -498,7 +487,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function carrierSelect()
|
function carrierSelect()
|
||||||
{
|
{
|
||||||
$carrier = new Sms_carrier();
|
$carrier = new Sms_carrier();
|
||||||
|
@ -538,7 +526,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function confirmCode()
|
function confirmCode()
|
||||||
{
|
{
|
||||||
$code = $this->trimmed('code');
|
$code = $this->trimmed('code');
|
||||||
|
@ -559,7 +546,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function removeIncoming()
|
function removeIncoming()
|
||||||
{
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
@ -575,7 +561,7 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
|
|
||||||
if (!$user->updateKeys($orig)) {
|
if (!$user->updateKeys($orig)) {
|
||||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||||
$this->serverError(_("Couldn't update user record."));
|
$this->serverError(_("Could not update user record."));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->showForm(_('Incoming email address removed.'), true);
|
$this->showForm(_('Incoming email address removed.'), true);
|
||||||
|
@ -588,7 +574,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
*
|
*
|
||||||
* @see Emailsettings::newIncoming
|
* @see Emailsettings::newIncoming
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function newIncoming()
|
function newIncoming()
|
||||||
{
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
@ -599,7 +584,7 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||||
|
|
||||||
if (!$user->updateKeys($orig)) {
|
if (!$user->updateKeys($orig)) {
|
||||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||||
$this->serverError(_("Couldn't update user record."));
|
$this->serverError(_("Could not update user record."));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->showForm(_('New incoming email address added.'), true);
|
$this->showForm(_('New incoming email address added.'), true);
|
||||||
|
|
|
@ -46,7 +46,6 @@ require_once INSTALLDIR . '/lib/designsettings.php';
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @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 UserDesignSettingsAction extends DesignSettingsAction
|
class UserDesignSettingsAction extends DesignSettingsAction
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -70,7 +69,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
|
||||||
*
|
*
|
||||||
* @return string Title of the page
|
* @return string Title of the page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
return _('Profile design');
|
return _('Profile design');
|
||||||
|
@ -81,7 +79,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
|
||||||
*
|
*
|
||||||
* @return instructions for use
|
* @return instructions for use
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
return _('Customize the way your profile looks ' .
|
return _('Customize the way your profile looks ' .
|
||||||
|
@ -93,7 +90,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
|
||||||
*
|
*
|
||||||
* @return Design
|
* @return Design
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getWorkingDesign()
|
function getWorkingDesign()
|
||||||
{
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
@ -108,7 +104,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
$design = $this->getWorkingDesign();
|
$design = $this->getWorkingDesign();
|
||||||
|
@ -125,7 +120,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function saveDesign()
|
function saveDesign()
|
||||||
{
|
{
|
||||||
foreach ($this->args as $key => $val) {
|
foreach ($this->args as $key => $val) {
|
||||||
|
@ -168,7 +162,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
|
||||||
$design = $user->getDesign();
|
$design = $user->getDesign();
|
||||||
|
|
||||||
if (!empty($design)) {
|
if (!empty($design)) {
|
||||||
|
|
||||||
$original = clone($design);
|
$original = clone($design);
|
||||||
|
|
||||||
$design->backgroundcolor = $bgcolor->intValue();
|
$design->backgroundcolor = $bgcolor->intValue();
|
||||||
|
@ -183,13 +176,11 @@ class UserDesignSettingsAction extends DesignSettingsAction
|
||||||
|
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
common_log_db_error($design, 'UPDATE', __FILE__);
|
common_log_db_error($design, 'UPDATE', __FILE__);
|
||||||
$this->showForm(_('Couldn\'t update your design.'));
|
$this->showForm(_('Could not update your design.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// update design
|
// update design
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$user->query('BEGIN');
|
$user->query('BEGIN');
|
||||||
|
|
||||||
// save new design
|
// save new design
|
||||||
|
@ -236,7 +227,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
|
||||||
*
|
*
|
||||||
* @return nothing
|
* @return nothing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function sethd()
|
function sethd()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -281,5 +271,4 @@ class UserDesignSettingsAction extends DesignSettingsAction
|
||||||
|
|
||||||
$this->showForm(_('Enjoy your hotdog!'), true);
|
$this->showForm(_('Enjoy your hotdog!'), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,8 +63,13 @@ if (!function_exists('dl')) {
|
||||||
// Fortunately trying to call the disabled one will only trigger
|
// Fortunately trying to call the disabled one will only trigger
|
||||||
// a warning, not a fatal, so it's safe to leave it for our case.
|
// a warning, not a fatal, so it's safe to leave it for our case.
|
||||||
// Callers will be suppressing warnings anyway.
|
// Callers will be suppressing warnings anyway.
|
||||||
$disabled = array_filter(array_map('trim', explode(',', ini_get('disable_functions'))));
|
try {
|
||||||
if (!in_array('dl', $disabled)) {
|
// Reading the ini setting is hard as we don't know PHP's parsing,
|
||||||
|
// but we can check if it is disabled through reflection.
|
||||||
|
$dl = new ReflectionFunction('dl');
|
||||||
|
// $disabled = $dl->isDisabled(); // don't need to check this now
|
||||||
|
} catch (ReflectionException $e) {
|
||||||
|
// Ok, it *really* doesn't exist!
|
||||||
function dl($library) {
|
function dl($library) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
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
36
plugins/Bookmark/locale/ia/LC_MESSAGES/Bookmark.po
Normal file
36
plugins/Bookmark/locale/ia/LC_MESSAGES/Bookmark.po
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# Translation of StatusNet - Bookmark to Interlingua (Interlingua)
|
||||||
|
# Expored from translatewiki.net
|
||||||
|
#
|
||||||
|
# Author: McDutchie
|
||||||
|
# --
|
||||||
|
# This file is distributed under the same license as the StatusNet package.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: StatusNet - Bookmark\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2011-01-20 19:02+0000\n"
|
||||||
|
"PO-Revision-Date: 2011-01-20 19:06:24+0000\n"
|
||||||
|
"Language-Team: Interlingua <http://translatewiki.net/wiki/Portal:ia>\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-POT-Import-Date: 2011-01-14 23:54:45+0000\n"
|
||||||
|
"X-Generator: MediaWiki 1.18alpha (r80631); Translate extension (2010-09-17)\n"
|
||||||
|
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||||
|
"X-Language-Code: ia\n"
|
||||||
|
"X-Message-Group: #out-statusnet-plugin-bookmark\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#: bookmarkform.php:162
|
||||||
|
msgctxt "BUTTON"
|
||||||
|
msgid "Save"
|
||||||
|
msgstr "Salveguardar"
|
||||||
|
|
||||||
|
#: importdelicious.php:340
|
||||||
|
msgctxt "BUTTON"
|
||||||
|
msgid "Upload"
|
||||||
|
msgstr "Incargar"
|
||||||
|
|
||||||
|
#: BookmarkPlugin.php:458
|
||||||
|
msgid "Simple extension for supporting bookmarks."
|
||||||
|
msgstr "Extension simple pro supportar marcapaginas."
|
36
plugins/Bookmark/locale/mk/LC_MESSAGES/Bookmark.po
Normal file
36
plugins/Bookmark/locale/mk/LC_MESSAGES/Bookmark.po
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# Translation of StatusNet - Bookmark to Macedonian (Македонски)
|
||||||
|
# Expored from translatewiki.net
|
||||||
|
#
|
||||||
|
# Author: Bjankuloski06
|
||||||
|
# --
|
||||||
|
# This file is distributed under the same license as the StatusNet package.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: StatusNet - Bookmark\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2011-01-20 19:02+0000\n"
|
||||||
|
"PO-Revision-Date: 2011-01-20 19:06:24+0000\n"
|
||||||
|
"Language-Team: Macedonian <http://translatewiki.net/wiki/Portal:mk>\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-POT-Import-Date: 2011-01-14 23:54:45+0000\n"
|
||||||
|
"X-Generator: MediaWiki 1.18alpha (r80631); Translate extension (2010-09-17)\n"
|
||||||
|
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||||
|
"X-Language-Code: mk\n"
|
||||||
|
"X-Message-Group: #out-statusnet-plugin-bookmark\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n == 1 || n%10 == 1) ? 0 : 1;\n"
|
||||||
|
|
||||||
|
#: bookmarkform.php:162
|
||||||
|
msgctxt "BUTTON"
|
||||||
|
msgid "Save"
|
||||||
|
msgstr "Зачувај"
|
||||||
|
|
||||||
|
#: importdelicious.php:340
|
||||||
|
msgctxt "BUTTON"
|
||||||
|
msgid "Upload"
|
||||||
|
msgstr "Подигни"
|
||||||
|
|
||||||
|
#: BookmarkPlugin.php:458
|
||||||
|
msgid "Simple extension for supporting bookmarks."
|
||||||
|
msgstr "Прост додаток за поддршка на обележувачи."
|
37
plugins/Bookmark/locale/uk/LC_MESSAGES/Bookmark.po
Normal file
37
plugins/Bookmark/locale/uk/LC_MESSAGES/Bookmark.po
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
# Translation of StatusNet - Bookmark to Ukrainian (Українська)
|
||||||
|
# Expored from translatewiki.net
|
||||||
|
#
|
||||||
|
# Author: Boogie
|
||||||
|
# --
|
||||||
|
# This file is distributed under the same license as the StatusNet package.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: StatusNet - Bookmark\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2011-01-20 19:02+0000\n"
|
||||||
|
"PO-Revision-Date: 2011-01-20 19:06:24+0000\n"
|
||||||
|
"Language-Team: Ukrainian <http://translatewiki.net/wiki/Portal:uk>\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-POT-Import-Date: 2011-01-14 23:54:45+0000\n"
|
||||||
|
"X-Generator: MediaWiki 1.18alpha (r80631); Translate extension (2010-09-17)\n"
|
||||||
|
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||||
|
"X-Language-Code: uk\n"
|
||||||
|
"X-Message-Group: #out-statusnet-plugin-bookmark\n"
|
||||||
|
"Plural-Forms: nplurals=3; plural=(n%10 == 1 && n%100 != 11) ? 0 : ( (n%10 >= "
|
||||||
|
"2 && n%10 <= 4 && (n%100 < 10 || n%100 >= 20)) ? 1 : 2 );\n"
|
||||||
|
|
||||||
|
#: bookmarkform.php:162
|
||||||
|
msgctxt "BUTTON"
|
||||||
|
msgid "Save"
|
||||||
|
msgstr "Зберегти"
|
||||||
|
|
||||||
|
#: importdelicious.php:340
|
||||||
|
msgctxt "BUTTON"
|
||||||
|
msgid "Upload"
|
||||||
|
msgstr "Завантажити"
|
||||||
|
|
||||||
|
#: BookmarkPlugin.php:458
|
||||||
|
msgid "Simple extension for supporting bookmarks."
|
||||||
|
msgstr "Простий додаток, що підтримує додавання закладок."
|
|
@ -232,6 +232,10 @@ class FBConnectauthAction extends Action
|
||||||
|
|
||||||
function createNewUser()
|
function createNewUser()
|
||||||
{
|
{
|
||||||
|
if (!Event::handle('StartRegistrationTry', array($this))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (common_config('site', 'closed')) {
|
if (common_config('site', 'closed')) {
|
||||||
// TRANS: Client error trying to register with registrations not allowed.
|
// TRANS: Client error trying to register with registrations not allowed.
|
||||||
$this->clientError(_m('Registration not allowed.'));
|
$this->clientError(_m('Registration not allowed.'));
|
||||||
|
@ -297,6 +301,8 @@ class FBConnectauthAction extends Action
|
||||||
common_debug('Facebook Connect Plugin - ' .
|
common_debug('Facebook Connect Plugin - ' .
|
||||||
"Registered new user $user->id from Facebook user $this->fbuid");
|
"Registered new user $user->id from Facebook user $this->fbuid");
|
||||||
|
|
||||||
|
Event::handle('EndRegistrationTry', array($this));
|
||||||
|
|
||||||
common_redirect(common_local_url('showstream', array('nickname' => $user->nickname)),
|
common_redirect(common_local_url('showstream', array('nickname' => $user->nickname)),
|
||||||
303);
|
303);
|
||||||
}
|
}
|
||||||
|
|
78
plugins/MobileProfile/locale/ce/LC_MESSAGES/MobileProfile.po
Normal file
78
plugins/MobileProfile/locale/ce/LC_MESSAGES/MobileProfile.po
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
# Translation of StatusNet - MobileProfile to Chechen (Нохчийн)
|
||||||
|
# Expored from translatewiki.net
|
||||||
|
#
|
||||||
|
# Author: Sasan700
|
||||||
|
# --
|
||||||
|
# This file is distributed under the same license as the StatusNet package.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: StatusNet - MobileProfile\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2011-01-20 19:03+0000\n"
|
||||||
|
"PO-Revision-Date: 2011-01-20 19:07:19+0000\n"
|
||||||
|
"Language-Team: Chechen <http://translatewiki.net/wiki/Portal:ce>\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-POT-Import-Date: 2011-01-14 13:21:16+0000\n"
|
||||||
|
"X-Generator: MediaWiki 1.18alpha (r80631); Translate extension (2010-09-17)\n"
|
||||||
|
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||||
|
"X-Language-Code: ce\n"
|
||||||
|
"X-Message-Group: #out-statusnet-plugin-mobileprofile\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#: MobileProfilePlugin.php:193
|
||||||
|
msgid "This page is not available in a media type you accept."
|
||||||
|
msgstr "Агlо схьа ца гойту ишта тайпнара чун, ахьа лелош йолу."
|
||||||
|
|
||||||
|
#: MobileProfilePlugin.php:310
|
||||||
|
msgid "Home"
|
||||||
|
msgstr "Цlехьа"
|
||||||
|
|
||||||
|
#: MobileProfilePlugin.php:312
|
||||||
|
msgid "Account"
|
||||||
|
msgstr "Дlавазвалар"
|
||||||
|
|
||||||
|
#: MobileProfilePlugin.php:314
|
||||||
|
msgid "Connect"
|
||||||
|
msgstr "Зlе тасар"
|
||||||
|
|
||||||
|
#: MobileProfilePlugin.php:317
|
||||||
|
msgid "Admin"
|
||||||
|
msgstr "Адаманкуьйгалхо"
|
||||||
|
|
||||||
|
#: MobileProfilePlugin.php:317
|
||||||
|
msgid "Change site configuration"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: MobileProfilePlugin.php:321
|
||||||
|
msgid "Invite"
|
||||||
|
msgstr "Схьакхайкха"
|
||||||
|
|
||||||
|
#: MobileProfilePlugin.php:324
|
||||||
|
msgid "Logout"
|
||||||
|
msgstr "Ара валар"
|
||||||
|
|
||||||
|
#: MobileProfilePlugin.php:328
|
||||||
|
msgid "Register"
|
||||||
|
msgstr "Дlавазвалар"
|
||||||
|
|
||||||
|
#: MobileProfilePlugin.php:331
|
||||||
|
msgid "Login"
|
||||||
|
msgstr "Вовзийта хьой"
|
||||||
|
|
||||||
|
#: MobileProfilePlugin.php:335
|
||||||
|
msgid "Search"
|
||||||
|
msgstr "Лаха"
|
||||||
|
|
||||||
|
#: MobileProfilePlugin.php:361
|
||||||
|
msgid "Attach"
|
||||||
|
msgstr "Тlечlагlде"
|
||||||
|
|
||||||
|
#: MobileProfilePlugin.php:365
|
||||||
|
msgid "Attach a file"
|
||||||
|
msgstr "Тlечlагlйе хlума"
|
||||||
|
|
||||||
|
#: MobileProfilePlugin.php:417
|
||||||
|
msgid "XHTML MobileProfile output for supporting user agents."
|
||||||
|
msgstr "XHTML MobileProfile арайокху иза лелочу декъашхошна аттон."
|
98
plugins/NewMenu/locale/ia/LC_MESSAGES/NewMenu.po
Normal file
98
plugins/NewMenu/locale/ia/LC_MESSAGES/NewMenu.po
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
# Translation of StatusNet - NewMenu to Interlingua (Interlingua)
|
||||||
|
# Expored from translatewiki.net
|
||||||
|
#
|
||||||
|
# Author: McDutchie
|
||||||
|
# --
|
||||||
|
# This file is distributed under the same license as the StatusNet package.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: StatusNet - NewMenu\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2011-01-20 19:03+0000\n"
|
||||||
|
"PO-Revision-Date: 2011-01-20 19:07:22+0000\n"
|
||||||
|
"Language-Team: Interlingua <http://translatewiki.net/wiki/Portal:ia>\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-POT-Import-Date: 2011-01-14 23:54:27+0000\n"
|
||||||
|
"X-Generator: MediaWiki 1.18alpha (r80631); Translate extension (2010-09-17)\n"
|
||||||
|
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||||
|
"X-Language-Code: ia\n"
|
||||||
|
"X-Message-Group: #out-statusnet-plugin-newmenu\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:99
|
||||||
|
msgid "Home"
|
||||||
|
msgstr "Initio"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:100
|
||||||
|
msgid "Friends timeline"
|
||||||
|
msgstr "Chronologia de amicos"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:105
|
||||||
|
msgid "Profile"
|
||||||
|
msgstr "Profilo"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:106
|
||||||
|
msgid "Your profile"
|
||||||
|
msgstr "Tu profilo"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:110 NewMenuPlugin.php:133
|
||||||
|
msgid "Public"
|
||||||
|
msgstr "Public"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:111 NewMenuPlugin.php:134
|
||||||
|
msgid "Everyone on this site"
|
||||||
|
msgstr "Omnes in iste sito"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:115
|
||||||
|
msgid "Settings"
|
||||||
|
msgstr "Configurationes"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:116
|
||||||
|
msgid "Change your personal settings"
|
||||||
|
msgstr "Cambiar tu optiones personal"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:121
|
||||||
|
msgid "Admin"
|
||||||
|
msgstr "Admin"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:122
|
||||||
|
msgid "Site configuration"
|
||||||
|
msgstr "Configuration del sito"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:127
|
||||||
|
msgid "Logout"
|
||||||
|
msgstr "Clauder session"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:128
|
||||||
|
msgid "Logout from the site"
|
||||||
|
msgstr "Terminar le session del sito"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:138
|
||||||
|
msgid "Login"
|
||||||
|
msgstr "Aperir session"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:139
|
||||||
|
msgid "Login to the site"
|
||||||
|
msgstr "Authenticar te a iste sito"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:146
|
||||||
|
msgid "Search"
|
||||||
|
msgstr "Recerca"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:147
|
||||||
|
msgid "Search the site"
|
||||||
|
msgstr "Cercar in le sito"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:332
|
||||||
|
msgid "IM"
|
||||||
|
msgstr "MI"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:339
|
||||||
|
msgid "SMS"
|
||||||
|
msgstr "SMS"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:431
|
||||||
|
msgid "A preview of the new menu layout in StatusNet 1.0."
|
||||||
|
msgstr "Un previsualisation del nove apparentia del menus in StatusNet 1.0."
|
98
plugins/NewMenu/locale/mk/LC_MESSAGES/NewMenu.po
Normal file
98
plugins/NewMenu/locale/mk/LC_MESSAGES/NewMenu.po
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
# Translation of StatusNet - NewMenu to Macedonian (Македонски)
|
||||||
|
# Expored from translatewiki.net
|
||||||
|
#
|
||||||
|
# Author: Bjankuloski06
|
||||||
|
# --
|
||||||
|
# This file is distributed under the same license as the StatusNet package.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: StatusNet - NewMenu\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2011-01-20 19:03+0000\n"
|
||||||
|
"PO-Revision-Date: 2011-01-20 19:07:22+0000\n"
|
||||||
|
"Language-Team: Macedonian <http://translatewiki.net/wiki/Portal:mk>\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-POT-Import-Date: 2011-01-14 23:54:27+0000\n"
|
||||||
|
"X-Generator: MediaWiki 1.18alpha (r80631); Translate extension (2010-09-17)\n"
|
||||||
|
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||||
|
"X-Language-Code: mk\n"
|
||||||
|
"X-Message-Group: #out-statusnet-plugin-newmenu\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n == 1 || n%10 == 1) ? 0 : 1;\n"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:99
|
||||||
|
msgid "Home"
|
||||||
|
msgstr "Почетна"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:100
|
||||||
|
msgid "Friends timeline"
|
||||||
|
msgstr "Хронологија на пријатели"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:105
|
||||||
|
msgid "Profile"
|
||||||
|
msgstr "Профил"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:106
|
||||||
|
msgid "Your profile"
|
||||||
|
msgstr "Вашиот профил"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:110 NewMenuPlugin.php:133
|
||||||
|
msgid "Public"
|
||||||
|
msgstr "Јавно"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:111 NewMenuPlugin.php:134
|
||||||
|
msgid "Everyone on this site"
|
||||||
|
msgstr "Секој на мрежново место"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:115
|
||||||
|
msgid "Settings"
|
||||||
|
msgstr "Нагодувања"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:116
|
||||||
|
msgid "Change your personal settings"
|
||||||
|
msgstr "Промена на личните нагодувања"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:121
|
||||||
|
msgid "Admin"
|
||||||
|
msgstr "Админ"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:122
|
||||||
|
msgid "Site configuration"
|
||||||
|
msgstr "Поставки за мрежното место"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:127
|
||||||
|
msgid "Logout"
|
||||||
|
msgstr "Одјава"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:128
|
||||||
|
msgid "Logout from the site"
|
||||||
|
msgstr "Одјава од мрежното место"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:138
|
||||||
|
msgid "Login"
|
||||||
|
msgstr "Најава"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:139
|
||||||
|
msgid "Login to the site"
|
||||||
|
msgstr "Најава на мрежното место"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:146
|
||||||
|
msgid "Search"
|
||||||
|
msgstr "Пребарај"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:147
|
||||||
|
msgid "Search the site"
|
||||||
|
msgstr "Пребарување на мрежното место"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:332
|
||||||
|
msgid "IM"
|
||||||
|
msgstr "НП"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:339
|
||||||
|
msgid "SMS"
|
||||||
|
msgstr "СМС"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:431
|
||||||
|
msgid "A preview of the new menu layout in StatusNet 1.0."
|
||||||
|
msgstr "Преглед на новиот распоред на менито во StatusNet 1.0."
|
99
plugins/NewMenu/locale/uk/LC_MESSAGES/NewMenu.po
Normal file
99
plugins/NewMenu/locale/uk/LC_MESSAGES/NewMenu.po
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
# Translation of StatusNet - NewMenu to Ukrainian (Українська)
|
||||||
|
# Expored from translatewiki.net
|
||||||
|
#
|
||||||
|
# Author: Boogie
|
||||||
|
# --
|
||||||
|
# This file is distributed under the same license as the StatusNet package.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: StatusNet - NewMenu\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2011-01-20 19:03+0000\n"
|
||||||
|
"PO-Revision-Date: 2011-01-20 19:07:22+0000\n"
|
||||||
|
"Language-Team: Ukrainian <http://translatewiki.net/wiki/Portal:uk>\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-POT-Import-Date: 2011-01-14 23:54:27+0000\n"
|
||||||
|
"X-Generator: MediaWiki 1.18alpha (r80631); Translate extension (2010-09-17)\n"
|
||||||
|
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||||
|
"X-Language-Code: uk\n"
|
||||||
|
"X-Message-Group: #out-statusnet-plugin-newmenu\n"
|
||||||
|
"Plural-Forms: nplurals=3; plural=(n%10 == 1 && n%100 != 11) ? 0 : ( (n%10 >= "
|
||||||
|
"2 && n%10 <= 4 && (n%100 < 10 || n%100 >= 20)) ? 1 : 2 );\n"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:99
|
||||||
|
msgid "Home"
|
||||||
|
msgstr "Дім"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:100
|
||||||
|
msgid "Friends timeline"
|
||||||
|
msgstr "Стрічка друзів"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:105
|
||||||
|
msgid "Profile"
|
||||||
|
msgstr "Профіль"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:106
|
||||||
|
msgid "Your profile"
|
||||||
|
msgstr "Ваш профіль"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:110 NewMenuPlugin.php:133
|
||||||
|
msgid "Public"
|
||||||
|
msgstr "Загал"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:111 NewMenuPlugin.php:134
|
||||||
|
msgid "Everyone on this site"
|
||||||
|
msgstr "Всі на цьому сайті"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:115
|
||||||
|
msgid "Settings"
|
||||||
|
msgstr "Параметри"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:116
|
||||||
|
msgid "Change your personal settings"
|
||||||
|
msgstr "Змінити налаштування профілю"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:121
|
||||||
|
msgid "Admin"
|
||||||
|
msgstr "Адмін"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:122
|
||||||
|
msgid "Site configuration"
|
||||||
|
msgstr "Конфігурація сайту"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:127
|
||||||
|
msgid "Logout"
|
||||||
|
msgstr "Вийти"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:128
|
||||||
|
msgid "Logout from the site"
|
||||||
|
msgstr "Вийти з сайту"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:138
|
||||||
|
msgid "Login"
|
||||||
|
msgstr "Увійти"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:139
|
||||||
|
msgid "Login to the site"
|
||||||
|
msgstr "Увійти на сайт"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:146
|
||||||
|
msgid "Search"
|
||||||
|
msgstr "Пошук"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:147
|
||||||
|
msgid "Search the site"
|
||||||
|
msgstr "Пошук на сайті"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:332
|
||||||
|
msgid "IM"
|
||||||
|
msgstr "ІМ"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:339
|
||||||
|
msgid "SMS"
|
||||||
|
msgstr "СМС"
|
||||||
|
|
||||||
|
#: NewMenuPlugin.php:431
|
||||||
|
msgid "A preview of the new menu layout in StatusNet 1.0."
|
||||||
|
msgstr "Попередній перегляд нового макета меню в StatusNet 1.0"
|
|
@ -262,6 +262,10 @@ class FinishopenidloginAction extends Action
|
||||||
{
|
{
|
||||||
# FIXME: save invite code before redirect, and check here
|
# FIXME: save invite code before redirect, and check here
|
||||||
|
|
||||||
|
if (!Event::handle('StartRegistrationTry', array($this))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (common_config('site', 'closed')) {
|
if (common_config('site', 'closed')) {
|
||||||
// TRANS: OpenID plugin message. No new user registration is allowed on the site.
|
// TRANS: OpenID plugin message. No new user registration is allowed on the site.
|
||||||
$this->clientError(_m('Registration not allowed.'));
|
$this->clientError(_m('Registration not allowed.'));
|
||||||
|
@ -374,6 +378,9 @@ class FinishopenidloginAction extends Action
|
||||||
common_rememberme($user);
|
common_rememberme($user);
|
||||||
}
|
}
|
||||||
unset($_SESSION['openid_rememberme']);
|
unset($_SESSION['openid_rememberme']);
|
||||||
|
|
||||||
|
Event::handle('EndRegistrationTry', array($this));
|
||||||
|
|
||||||
common_redirect(common_local_url('showstream', array('nickname' => $user->nickname)),
|
common_redirect(common_local_url('showstream', array('nickname' => $user->nickname)),
|
||||||
303);
|
303);
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,28 +167,24 @@ class RegisterThrottlePlugin extends Plugin
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called after someone registers.
|
* Called after someone registers, by any means.
|
||||||
*
|
*
|
||||||
* We record the successful registration and IP address.
|
* We record the successful registration and IP address.
|
||||||
*
|
*
|
||||||
* @param Action $action Action that is being executed
|
* @param Profile $profile new user's profile
|
||||||
|
* @param User $user new user
|
||||||
*
|
*
|
||||||
* @return boolean hook value
|
* @return boolean hook value
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function onEndRegistrationTry($action)
|
function onEndUserRegister($profile, $user)
|
||||||
{
|
{
|
||||||
$ipaddress = $this->_getIpAddress();
|
$ipaddress = $this->_getIpAddress();
|
||||||
|
|
||||||
if (empty($ipaddress)) {
|
if (empty($ipaddress)) {
|
||||||
throw new ServerException(_m('Cannot find IP address.'));
|
// User registration can happen from command-line scripts etc.
|
||||||
}
|
return true;
|
||||||
|
|
||||||
$user = common_current_user();
|
|
||||||
|
|
||||||
if (empty($user)) {
|
|
||||||
throw new ServerException(_m('Cannot find user after successful registration.'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$reg = new Registration_ip();
|
$reg = new Registration_ip();
|
||||||
|
|
26
plugins/SQLProfile/locale/ia/LC_MESSAGES/SQLProfile.po
Normal file
26
plugins/SQLProfile/locale/ia/LC_MESSAGES/SQLProfile.po
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# Translation of StatusNet - SQLProfile to Interlingua (Interlingua)
|
||||||
|
# Expored from translatewiki.net
|
||||||
|
#
|
||||||
|
# Author: McDutchie
|
||||||
|
# --
|
||||||
|
# This file is distributed under the same license as the StatusNet package.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: StatusNet - SQLProfile\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2011-01-20 19:03+0000\n"
|
||||||
|
"PO-Revision-Date: 2011-01-20 19:08:00+0000\n"
|
||||||
|
"Language-Team: Interlingua <http://translatewiki.net/wiki/Portal:ia>\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-POT-Import-Date: 2011-01-14 23:56:59+0000\n"
|
||||||
|
"X-Generator: MediaWiki 1.18alpha (r80631); Translate extension (2010-09-17)\n"
|
||||||
|
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||||
|
"X-Language-Code: ia\n"
|
||||||
|
"X-Message-Group: #out-statusnet-plugin-sqlprofile\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#: SQLProfilePlugin.php:41
|
||||||
|
msgid "Debug tool to watch for poorly indexed DB queries."
|
||||||
|
msgstr "Instrumento pro deteger le consultas mal indexate del base de datos."
|
28
plugins/SQLProfile/locale/mk/LC_MESSAGES/SQLProfile.po
Normal file
28
plugins/SQLProfile/locale/mk/LC_MESSAGES/SQLProfile.po
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
# Translation of StatusNet - SQLProfile to Macedonian (Македонски)
|
||||||
|
# Expored from translatewiki.net
|
||||||
|
#
|
||||||
|
# Author: Bjankuloski06
|
||||||
|
# --
|
||||||
|
# This file is distributed under the same license as the StatusNet package.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: StatusNet - SQLProfile\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2011-01-20 19:03+0000\n"
|
||||||
|
"PO-Revision-Date: 2011-01-20 19:08:00+0000\n"
|
||||||
|
"Language-Team: Macedonian <http://translatewiki.net/wiki/Portal:mk>\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-POT-Import-Date: 2011-01-14 23:56:59+0000\n"
|
||||||
|
"X-Generator: MediaWiki 1.18alpha (r80631); Translate extension (2010-09-17)\n"
|
||||||
|
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||||
|
"X-Language-Code: mk\n"
|
||||||
|
"X-Message-Group: #out-statusnet-plugin-sqlprofile\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n == 1 || n%10 == 1) ? 0 : 1;\n"
|
||||||
|
|
||||||
|
#: SQLProfilePlugin.php:41
|
||||||
|
msgid "Debug tool to watch for poorly indexed DB queries."
|
||||||
|
msgstr ""
|
||||||
|
"Алатка за поправање грешки што пронаоѓа лошо индексирани барања до базата на "
|
||||||
|
"податоци."
|
|
@ -9,19 +9,18 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: StatusNet - SQLProfile\n"
|
"Project-Id-Version: StatusNet - SQLProfile\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2011-01-14 23:32+0000\n"
|
"POT-Creation-Date: 2011-01-20 19:03+0000\n"
|
||||||
"PO-Revision-Date: 2011-01-14 23:37:11+0000\n"
|
"PO-Revision-Date: 2011-01-20 19:08:00+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: 2011-01-14 14:17:53+0000\n"
|
"X-POT-Import-Date: 2011-01-14 23:56:59+0000\n"
|
||||||
"X-Generator: MediaWiki 1.18alpha (r80343); Translate extension (2010-09-17)\n"
|
"X-Generator: MediaWiki 1.18alpha (r80631); 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-sqlprofile\n"
|
"X-Message-Group: #out-statusnet-plugin-sqlprofile\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
#: SQLProfilePlugin.php:41
|
#: SQLProfilePlugin.php:41
|
||||||
#, fuzzy
|
|
||||||
msgid "Debug tool to watch for poorly indexed DB queries."
|
msgid "Debug tool to watch for poorly indexed DB queries."
|
||||||
msgstr "Debughulpmiddel om slecht geïndexeerde databasequery's te ontdekken."
|
msgstr "Debughulpmiddel om slecht geïndexeerde databasequery's te ontdekken."
|
||||||
|
|
29
plugins/SQLProfile/locale/uk/LC_MESSAGES/SQLProfile.po
Normal file
29
plugins/SQLProfile/locale/uk/LC_MESSAGES/SQLProfile.po
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# Translation of StatusNet - SQLProfile to Ukrainian (Українська)
|
||||||
|
# Expored from translatewiki.net
|
||||||
|
#
|
||||||
|
# Author: Boogie
|
||||||
|
# --
|
||||||
|
# This file is distributed under the same license as the StatusNet package.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: StatusNet - SQLProfile\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2011-01-20 19:03+0000\n"
|
||||||
|
"PO-Revision-Date: 2011-01-20 19:08:00+0000\n"
|
||||||
|
"Language-Team: Ukrainian <http://translatewiki.net/wiki/Portal:uk>\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-POT-Import-Date: 2011-01-14 23:56:59+0000\n"
|
||||||
|
"X-Generator: MediaWiki 1.18alpha (r80631); Translate extension (2010-09-17)\n"
|
||||||
|
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
|
||||||
|
"X-Language-Code: uk\n"
|
||||||
|
"X-Message-Group: #out-statusnet-plugin-sqlprofile\n"
|
||||||
|
"Plural-Forms: nplurals=3; plural=(n%10 == 1 && n%100 != 11) ? 0 : ( (n%10 >= "
|
||||||
|
"2 && n%10 <= 4 && (n%100 < 10 || n%100 >= 20)) ? 1 : 2 );\n"
|
||||||
|
|
||||||
|
#: SQLProfilePlugin.php:41
|
||||||
|
msgid "Debug tool to watch for poorly indexed DB queries."
|
||||||
|
msgstr ""
|
||||||
|
"Інструмент правки для спостереження за погано індексованими запитами до бази "
|
||||||
|
"даних."
|
|
@ -419,6 +419,10 @@ class TwitterauthorizationAction extends Action
|
||||||
|
|
||||||
function createNewUser()
|
function createNewUser()
|
||||||
{
|
{
|
||||||
|
if (!Event::handle('StartRegistrationTry', array($this))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (common_config('site', 'closed')) {
|
if (common_config('site', 'closed')) {
|
||||||
$this->clientError(_m('Registration not allowed.'));
|
$this->clientError(_m('Registration not allowed.'));
|
||||||
return;
|
return;
|
||||||
|
@ -490,6 +494,8 @@ class TwitterauthorizationAction extends Action
|
||||||
common_debug('TwitterBridge Plugin - ' .
|
common_debug('TwitterBridge Plugin - ' .
|
||||||
"Registered new user $user->id from Twitter user $this->twuid");
|
"Registered new user $user->id from Twitter user $this->twuid");
|
||||||
|
|
||||||
|
Event::handle('EndRegistrationTry', array($this));
|
||||||
|
|
||||||
common_redirect(common_local_url('showstream', array('nickname' => $user->nickname)),
|
common_redirect(common_local_url('showstream', array('nickname' => $user->nickname)),
|
||||||
303);
|
303);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user