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
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class ApiAtomServiceAction extends ApiBareAuthAction
|
||||
{
|
||||
/**
|
||||
@ -50,13 +49,13 @@ class ApiAtomServiceAction extends ApiBareAuthAction
|
||||
* @return boolean success flag
|
||||
*
|
||||
*/
|
||||
|
||||
function prepare($args)
|
||||
{
|
||||
parent::prepare($args);
|
||||
$this->user = $this->getTargetUser($this->arg('id'));
|
||||
|
||||
if (empty($this->user)) {
|
||||
// TRANS: Client error displayed when making an Atom API request for an unknown user.
|
||||
$this->clientError(_('No such user.'), 404, $this->format);
|
||||
return;
|
||||
}
|
||||
@ -71,7 +70,6 @@ class ApiAtomServiceAction extends ApiBareAuthAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handle($args)
|
||||
{
|
||||
parent::handle($args);
|
||||
@ -83,13 +81,15 @@ class ApiAtomServiceAction extends ApiBareAuthAction
|
||||
'xmlns:atom' => 'http://www.w3.org/2005/Atom',
|
||||
'xmlns:activity' => 'http://activitystrea.ms/spec/1.0/'));
|
||||
$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',
|
||||
array('href' => common_local_url('ApiTimelineUser',
|
||||
array('id' => $this->user->id,
|
||||
'format' => 'atom'))));
|
||||
$this->element('atom:title',
|
||||
null,
|
||||
// TRANS: Title for Atom feed. %s is a user nickname.
|
||||
sprintf(_("%s timeline"),
|
||||
$this->user->nickname));
|
||||
$this->element('accept', null, 'application/atom+xml;type=entry');
|
||||
@ -100,6 +100,7 @@ class ApiAtomServiceAction extends ApiBareAuthAction
|
||||
array('subscriber' => $this->user->id))));
|
||||
$this->element('atom:title',
|
||||
null,
|
||||
// TRANS: Title for Atom feed with a user's subscriptions. %s is a user nickname.
|
||||
sprintf(_("%s subscriptions"),
|
||||
$this->user->nickname));
|
||||
$this->element('accept', null, 'application/atom+xml;type=entry');
|
||||
@ -110,6 +111,7 @@ class ApiAtomServiceAction extends ApiBareAuthAction
|
||||
array('profile' => $this->user->id))));
|
||||
$this->element('atom:title',
|
||||
null,
|
||||
// TRANS: Title for Atom feed with a user's favorite notices. %s is a user nickname.
|
||||
sprintf(_("%s favorites"),
|
||||
$this->user->nickname));
|
||||
$this->element('accept', null, 'application/atom+xml;type=entry');
|
||||
@ -120,6 +122,7 @@ class ApiAtomServiceAction extends ApiBareAuthAction
|
||||
array('profile' => $this->user->id))));
|
||||
$this->element('atom:title',
|
||||
null,
|
||||
// TRANS: Title for Atom feed with a user's memberships. %s is a user nickname.
|
||||
sprintf(_("%s memberships"),
|
||||
$this->user->nickname));
|
||||
$this->element('accept', null, 'application/atom+xml;type=entry');
|
||||
|
@ -92,6 +92,7 @@ class ApiBlockCreateAction extends ApiAuthAction
|
||||
}
|
||||
|
||||
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);
|
||||
return;
|
||||
}
|
||||
|
@ -114,6 +114,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
|
||||
$this->deleteNotice();
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client error displayed calling an unsupported HTTP error in API status show.
|
||||
$this->clientError(_('HTTP method not supported.'), 405);
|
||||
return;
|
||||
}
|
||||
@ -138,6 +139,8 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
|
||||
$this->showSingleAtomStatus($this->notice);
|
||||
break;
|
||||
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));
|
||||
}
|
||||
} else {
|
||||
@ -220,6 +223,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
|
||||
function deleteNotice()
|
||||
{
|
||||
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."));
|
||||
return;
|
||||
}
|
||||
@ -227,7 +231,8 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
|
||||
if (empty($this->auth_user) ||
|
||||
($this->notice->profile_id != $this->auth_user->id &&
|
||||
!$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;
|
||||
}
|
||||
|
||||
@ -240,6 +245,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
|
||||
|
||||
header('HTTP/1.1 200 OK');
|
||||
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("\n");
|
||||
}
|
||||
|
@ -307,11 +307,13 @@ class ApiTimelineUserAction extends ApiBareAuthAction
|
||||
|
||||
$xml = trim(file_get_contents('php://input'));
|
||||
if (empty($xml)) {
|
||||
// TRANS: Client error displayed attempting to post an empty API notice.
|
||||
$this->clientError(_('Atom post must not be empty.'));
|
||||
}
|
||||
|
||||
$dom = DOMDocument::loadXML($xml);
|
||||
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.'));
|
||||
}
|
||||
|
||||
@ -375,6 +377,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
|
||||
} else {
|
||||
// @fixme fetch from $sourceUrl?
|
||||
// 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.'),
|
||||
$note->id));
|
||||
return;
|
||||
@ -434,7 +437,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
|
||||
$options['groups'][] = $uri;
|
||||
} else {
|
||||
// @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
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class AtompubfavoritefeedAction extends ApiAuthAction
|
||||
{
|
||||
private $_profile = null;
|
||||
@ -59,7 +58,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return boolean true
|
||||
*/
|
||||
|
||||
function prepare($argarray)
|
||||
{
|
||||
parent::prepare($argarray);
|
||||
@ -67,7 +65,8 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||
$this->_profile = Profile::staticGet('id', $this->trimmed('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;
|
||||
@ -87,7 +86,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handle($argarray=null)
|
||||
{
|
||||
parent::handle($argarray);
|
||||
@ -101,6 +99,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||
$this->addFavorite();
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client exception thrown when using an unsupported HTTP method.
|
||||
throw new ClientException(_('HTTP method not supported.'), 405);
|
||||
return;
|
||||
}
|
||||
@ -113,7 +112,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showFeed()
|
||||
{
|
||||
header('Content-Type: application/atom+xml; charset=utf-8');
|
||||
@ -139,10 +137,14 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||
$feed->addAuthor($this->_profile->getBestName(),
|
||||
$this->_profile->getURI());
|
||||
|
||||
// TRANS: Title for Atom favorites feed.
|
||||
// TRANS: %s is a user nickname.
|
||||
$feed->setTitle(sprintf(_("%s favorites"),
|
||||
$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(),
|
||||
common_config('site', 'name')));
|
||||
|
||||
@ -205,15 +207,15 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function addFavorite()
|
||||
{
|
||||
// XXX: Refactor this; all the same for atompub
|
||||
|
||||
if (empty($this->auth_user) ||
|
||||
$this->auth_user->id != $this->_profile->id) {
|
||||
throw new ClientException(_("Can't add someone else's".
|
||||
" subscription"), 403);
|
||||
// TRANS: Client exception thrown when trying to set a favorite for another user.
|
||||
throw new ClientException(_("Cannot add someone else's".
|
||||
" subscription."), 403);
|
||||
}
|
||||
|
||||
$xml = file_get_contents('php://input');
|
||||
@ -234,9 +236,8 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||
if (Event::handle('StartAtomPubNewActivity', array(&$activity))) {
|
||||
|
||||
if ($activity->verb != ActivityVerb::FAVORITE) {
|
||||
// TRANS: Client error displayed when not using the POST verb.
|
||||
// TRANS: Do not translate POST.
|
||||
throw new ClientException(_('Can only handle Favorite activities.'));
|
||||
// TRANS: Client exception thrown when trying use an incorrect activity verb for the Atom pub method.
|
||||
throw new ClientException(_('Can only handle favorite activities.'));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -245,6 +246,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||
if (!in_array($note->type, array(ActivityObject::NOTE,
|
||||
ActivityObject::BLOGENTRY,
|
||||
ActivityObject::STATUS))) {
|
||||
// TRANS: Client exception thrown when trying favorite an object that is not a notice.
|
||||
throw new ClientException(_('Can only fave notices.'));
|
||||
return;
|
||||
}
|
||||
@ -253,6 +255,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||
|
||||
if (empty($notice)) {
|
||||
// XXX: import from listed URL or something
|
||||
// TRANS: Client exception thrown when trying favorite a notice without content.
|
||||
throw new ClientException(_('Unknown note.'));
|
||||
}
|
||||
|
||||
@ -260,6 +263,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||
'notice_id' => $notice->id));
|
||||
|
||||
if (!empty($old)) {
|
||||
// TRANS: Client exception thrown when trying favorite an already favorited notice.
|
||||
throw new ClientException(_('Already a favorite.'));
|
||||
}
|
||||
|
||||
@ -296,7 +300,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return boolean is read only action?
|
||||
*/
|
||||
|
||||
function isReadOnly($args)
|
||||
{
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
||||
@ -328,7 +331,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return string etag http header
|
||||
*/
|
||||
|
||||
function etag()
|
||||
{
|
||||
return null;
|
||||
@ -339,7 +341,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return boolean true if delete, else false
|
||||
*/
|
||||
|
||||
function requiresAuth()
|
||||
{
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
||||
@ -359,7 +360,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function notify($fave, $notice, $user)
|
||||
{
|
||||
$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
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class AtompubmembershipfeedAction extends ApiAuthAction
|
||||
{
|
||||
private $_profile = null;
|
||||
@ -59,7 +58,6 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return boolean true
|
||||
*/
|
||||
|
||||
function prepare($argarray)
|
||||
{
|
||||
parent::prepare($argarray);
|
||||
@ -69,6 +67,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||
$this->_profile = Profile::staticGet('id', $profileId);
|
||||
|
||||
if (empty($this->_profile)) {
|
||||
// TRANS: Client exception.
|
||||
throw new ClientException(_('No such profile.'), 404);
|
||||
}
|
||||
|
||||
@ -89,7 +88,6 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handle($argarray=null)
|
||||
{
|
||||
parent::handle($argarray);
|
||||
@ -103,6 +101,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||
$this->addMembership();
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client exception thrown when using an unsupported HTTP method.
|
||||
throw new ClientException(_('HTTP method not supported.'), 405);
|
||||
return;
|
||||
}
|
||||
@ -115,7 +114,6 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showFeed()
|
||||
{
|
||||
header('Content-Type: application/atom+xml; charset=utf-8');
|
||||
@ -141,10 +139,14 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||
$feed->addAuthor($this->_profile->getBestName(),
|
||||
$this->_profile->getURI());
|
||||
|
||||
// TRANS: Title for group membership feed.
|
||||
// TRANS: %s is a username.
|
||||
$feed->setTitle(sprintf(_("%s group memberships"),
|
||||
$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(),
|
||||
common_config('site', 'name')));
|
||||
|
||||
@ -207,14 +209,14 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function addMembership()
|
||||
{
|
||||
// XXX: Refactor this; all the same for atompub
|
||||
|
||||
if (empty($this->auth_user) ||
|
||||
$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);
|
||||
}
|
||||
|
||||
@ -234,17 +236,17 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||
$membership = null;
|
||||
|
||||
if (Event::handle('StartAtomPubNewActivity', array(&$activity))) {
|
||||
|
||||
if ($activity->verb != ActivityVerb::JOIN) {
|
||||
// TRANS: Client error displayed when not using the POST verb.
|
||||
// TRANS: Do not translate POST.
|
||||
throw new ClientException(_('Can only handle Join activities.'));
|
||||
throw new ClientException(_('Can only handle join activities.'));
|
||||
return;
|
||||
}
|
||||
|
||||
$groupObj = $activity->objects[0];
|
||||
|
||||
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.'));
|
||||
return;
|
||||
}
|
||||
@ -253,6 +255,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||
|
||||
if (empty($group)) {
|
||||
// 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.'));
|
||||
}
|
||||
|
||||
@ -260,6 +263,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||
'group_id' => $group->id));
|
||||
|
||||
if (!empty($old)) {
|
||||
// TRANS: Client exception thrown when trying to subscribe to an already subscribed group.
|
||||
throw new ClientException(_('Already a member.'));
|
||||
}
|
||||
|
||||
@ -267,6 +271,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||
|
||||
if (Group_block::isBlocked($group, $profile)) {
|
||||
// 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.'));
|
||||
}
|
||||
|
||||
@ -299,7 +304,6 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return boolean is read only action?
|
||||
*/
|
||||
|
||||
function isReadOnly($args)
|
||||
{
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
||||
@ -331,7 +335,6 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return string etag http header
|
||||
*/
|
||||
|
||||
function etag()
|
||||
{
|
||||
return null;
|
||||
@ -342,7 +345,6 @@ class AtompubmembershipfeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return boolean true if delete, else false
|
||||
*/
|
||||
|
||||
function requiresAuth()
|
||||
{
|
||||
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
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class AtompubshowfavoriteAction extends ApiAuthAction
|
||||
{
|
||||
private $_profile = null;
|
||||
@ -62,7 +61,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||
*
|
||||
* @return boolean true
|
||||
*/
|
||||
|
||||
function prepare($argarray)
|
||||
{
|
||||
parent::prepare($argarray);
|
||||
@ -73,12 +71,14 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||
$this->_profile = Profile::staticGet('id', $profileId);
|
||||
|
||||
if (empty($this->_profile)) {
|
||||
// TRANS: Client exception.
|
||||
throw new ClientException(_('No such profile.'), 404);
|
||||
}
|
||||
|
||||
$this->_notice = Notice::staticGet('id', $noticeId);
|
||||
|
||||
if (empty($this->_notice)) {
|
||||
// TRANS: Client exception thrown when referencing a non-existing notice.
|
||||
throw new ClientException(_('No such notice.'), 404);
|
||||
}
|
||||
|
||||
@ -86,6 +86,7 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||
'notice_id' => $noticeId));
|
||||
|
||||
if (empty($this->_fave)) {
|
||||
// TRANS: Client exception thrown when referencing a non-existing favorite.
|
||||
throw new ClientException(_('No such favorite.'), 404);
|
||||
}
|
||||
|
||||
@ -99,7 +100,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handle($argarray=null)
|
||||
{
|
||||
parent::handle($argarray);
|
||||
@ -113,6 +113,7 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||
$this->deleteFave();
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client exception thrown using an unsupported HTTP method.
|
||||
throw new ClientException(_('HTTP method not supported.'),
|
||||
405);
|
||||
}
|
||||
@ -124,7 +125,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showFave()
|
||||
{
|
||||
$activity = $this->_fave->asActivity();
|
||||
@ -143,12 +143,12 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function deleteFave()
|
||||
{
|
||||
if (empty($this->auth_user) ||
|
||||
$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);
|
||||
}
|
||||
|
||||
@ -166,7 +166,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||
*
|
||||
* @return boolean is read only action?
|
||||
*/
|
||||
|
||||
function isReadOnly($args)
|
||||
{
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
||||
@ -184,7 +183,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||
*
|
||||
* @return string last modified http header
|
||||
*/
|
||||
|
||||
function lastModified()
|
||||
{
|
||||
return max(strtotime($this->_profile->modified),
|
||||
@ -199,7 +197,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||
*
|
||||
* @return string etag http header
|
||||
*/
|
||||
|
||||
function etag()
|
||||
{
|
||||
$mtime = strtotime($this->_fave->modified);
|
||||
@ -215,7 +212,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
||||
*
|
||||
* @return boolean true if delete, else false
|
||||
*/
|
||||
|
||||
function requiresAuth()
|
||||
{
|
||||
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
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class AtompubshowmembershipAction extends ApiAuthAction
|
||||
{
|
||||
private $_profile = null;
|
||||
@ -60,7 +59,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||
*
|
||||
* @return boolean true
|
||||
*/
|
||||
|
||||
function prepare($argarray)
|
||||
{
|
||||
parent::prepare($argarray);
|
||||
@ -70,6 +68,7 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||
$this->_profile = Profile::staticGet('id', $profileId);
|
||||
|
||||
if (empty($this->_profile)) {
|
||||
// TRANS: Client exception.
|
||||
throw new ClientException(_('No such profile.'), 404);
|
||||
}
|
||||
|
||||
@ -78,6 +77,7 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||
$this->_group = User_group::staticGet('id', $groupId);
|
||||
|
||||
if (empty($this->_group)) {
|
||||
// TRANS: Client exception thrown when referencing a non-existing group.
|
||||
throw new ClientException(_('No such group'), 404);
|
||||
}
|
||||
|
||||
@ -87,6 +87,7 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||
$this->_membership = Group_member::pkeyGet($kv);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@ -100,7 +101,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handle($argarray=null)
|
||||
{
|
||||
switch ($_SERVER['REQUEST_METHOD']) {
|
||||
@ -112,7 +112,8 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||
$this->deleteMembership();
|
||||
break;
|
||||
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;
|
||||
}
|
||||
return;
|
||||
@ -123,7 +124,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showMembership()
|
||||
{
|
||||
$activity = $this->_membership->asActivity();
|
||||
@ -147,7 +147,8 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||
{
|
||||
if (empty($this->auth_user) ||
|
||||
$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);
|
||||
}
|
||||
|
||||
@ -168,7 +169,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||
*
|
||||
* @return boolean is read only action?
|
||||
*/
|
||||
|
||||
function isReadOnly($args)
|
||||
{
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
||||
@ -203,7 +203,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||
*
|
||||
* @return string etag http header
|
||||
*/
|
||||
|
||||
function etag()
|
||||
{
|
||||
$ctime = strtotime($this->_membership->created);
|
||||
@ -222,7 +221,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
|
||||
*
|
||||
* @return boolean true if delete, else false
|
||||
*/
|
||||
|
||||
function requiresAuth()
|
||||
{
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
|
||||
|
@ -69,7 +69,7 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
|
||||
if (empty($this->_subscriber)) {
|
||||
// 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'),
|
||||
throw new ClientException(sprintf(_('No such profile id: %d.'),
|
||||
$subscriberId), 404);
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
|
||||
if (empty($this->_subscribed)) {
|
||||
// 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'),
|
||||
throw new ClientException(sprintf(_('No such profile id: %d.'),
|
||||
$subscribedId), 404);
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
|
||||
if (empty($this->_subscription)) {
|
||||
// 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.
|
||||
$msg = sprintf(_('Profile %1$d not subscribed to profile %2$d'),
|
||||
$msg = sprintf(_('Profile %1$d not subscribed to profile %2$d.'),
|
||||
$subscriberId, $subscribedId);
|
||||
throw new ClientException($msg, 404);
|
||||
}
|
||||
@ -155,7 +155,7 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
|
||||
$this->auth_user->id != $this->_subscriber->id) {
|
||||
// TRANS: Client exception thrown when trying to delete a subscription of another user.
|
||||
throw new ClientException(_("Cannot delete someone else's ".
|
||||
"subscription"), 403);
|
||||
"subscription."), 403);
|
||||
}
|
||||
|
||||
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
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||
{
|
||||
private $_profile = null;
|
||||
@ -61,7 +60,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return boolean true
|
||||
*/
|
||||
|
||||
function prepare($argarray)
|
||||
{
|
||||
parent::prepare($argarray);
|
||||
@ -71,7 +69,9 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||
$this->_profile = Profile::staticGet('id', $subscriber);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@ -93,7 +93,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handle($argarray=null)
|
||||
{
|
||||
parent::handle($argarray);
|
||||
@ -106,6 +105,7 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||
$this->addSubscription();
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client exception thrown when using an unsupported HTTP method.
|
||||
$this->clientError(_('HTTP method not supported.'), 405);
|
||||
return;
|
||||
}
|
||||
@ -118,7 +118,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showFeed()
|
||||
{
|
||||
header('Content-Type: application/atom+xml; charset=utf-8');
|
||||
@ -144,10 +143,14 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||
$feed->addAuthor($this->_profile->getBestName(),
|
||||
$this->_profile->getURI());
|
||||
|
||||
// TRANS: Title for Atom subscription feed.
|
||||
// TRANS: %s is a user nickname.
|
||||
$feed->setTitle(sprintf(_("%s subscriptions"),
|
||||
$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(),
|
||||
common_config('site', 'name')));
|
||||
|
||||
@ -214,13 +217,13 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function addSubscription()
|
||||
{
|
||||
if (empty($this->auth_user) ||
|
||||
$this->auth_user->id != $this->_profile->id) {
|
||||
throw new ClientException(_("Can't add someone else's".
|
||||
" subscription"), 403);
|
||||
// TRANS: Client exception thrown when trying to subscribe another user.
|
||||
throw new ClientException(_("Cannot add someone else's".
|
||||
" subscription."), 403);
|
||||
}
|
||||
|
||||
$xml = file_get_contents('php://input');
|
||||
@ -250,6 +253,7 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||
$person = $activity->objects[0];
|
||||
|
||||
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.'));
|
||||
return;
|
||||
}
|
||||
@ -259,7 +263,8 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||
$profile = Profile::fromURI($person->id);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@ -298,7 +303,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return boolean is read only action?
|
||||
*/
|
||||
|
||||
function isReadOnly($args)
|
||||
{
|
||||
return $_SERVER['REQUEST_METHOD'] != 'POST';
|
||||
@ -309,7 +313,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return string last modified http header
|
||||
*/
|
||||
|
||||
function lastModified()
|
||||
{
|
||||
return null;
|
||||
@ -320,7 +323,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return string etag http header
|
||||
*/
|
||||
|
||||
function etag()
|
||||
{
|
||||
return null;
|
||||
@ -331,7 +333,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
|
||||
*
|
||||
* @return boolean true if delete, else false
|
||||
*/
|
||||
|
||||
function requiresAuth()
|
||||
{
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
|
@ -115,7 +115,7 @@ class ConfirmaddressAction extends Action
|
||||
if (!$result) {
|
||||
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.
|
||||
$this->serverError(_('Couldn\'t update user.'));
|
||||
$this->serverError(_('Could not update user.'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ class DeletenoticeAction extends Action
|
||||
if ($this->notice->profile_id != $this->user_profile->id &&
|
||||
!$this->user->hasRight(Right::DELETEOTHERSNOTICE)) {
|
||||
// TRANS: Error message displayed trying to delete a notice that was not made by the current user.
|
||||
common_user_error(_('Can\'t delete this notice.'));
|
||||
common_user_error(_('Cannot delete this notice.'));
|
||||
exit;
|
||||
}
|
||||
// XXX: Ajax!
|
||||
|
@ -356,7 +356,7 @@ class EmailsettingsAction extends AccountSettingsAction
|
||||
if ($result === false) {
|
||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||
// TRANS: Server error thrown on database error updating e-mail preferences.
|
||||
$this->serverError(_('Couldn\'t update user.'));
|
||||
$this->serverError(_('Could not update user.'));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -423,7 +423,7 @@ class EmailsettingsAction extends AccountSettingsAction
|
||||
if ($result === false) {
|
||||
common_log_db_error($confirm, 'INSERT', __FILE__);
|
||||
// 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;
|
||||
}
|
||||
|
||||
@ -465,7 +465,7 @@ class EmailsettingsAction extends AccountSettingsAction
|
||||
if (!$result) {
|
||||
common_log_db_error($confirm, 'DELETE', __FILE__);
|
||||
// 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;
|
||||
}
|
||||
|
||||
@ -505,7 +505,7 @@ class EmailsettingsAction extends AccountSettingsAction
|
||||
if (!$result) {
|
||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||
// 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;
|
||||
}
|
||||
$user->query('COMMIT');
|
||||
@ -537,7 +537,7 @@ class EmailsettingsAction extends AccountSettingsAction
|
||||
if (!$user->updateKeys($orig)) {
|
||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||
// 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.
|
||||
@ -562,7 +562,7 @@ class EmailsettingsAction extends AccountSettingsAction
|
||||
if (!$user->updateKeys($orig)) {
|
||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||
// 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.
|
||||
|
@ -263,7 +263,7 @@ class GroupDesignSettingsAction extends DesignSettingsAction
|
||||
|
||||
if ($result === false) {
|
||||
common_log_db_error($design, 'UPDATE', __FILE__);
|
||||
$this->showForm(_('Couldn\'t update your design.'));
|
||||
$this->showForm(_('Could not update your design.'));
|
||||
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
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class GrouplogoAction extends GroupDesignAction
|
||||
{
|
||||
var $mode = null;
|
||||
@ -67,6 +66,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||
parent::prepare($args);
|
||||
|
||||
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.'));
|
||||
return false;
|
||||
}
|
||||
@ -83,6 +83,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||
}
|
||||
|
||||
if (!$nickname) {
|
||||
// TRANS: Client error displayed when trying to change group logo settings without having a nickname.
|
||||
$this->clientError(_('No nickname.'), 404);
|
||||
return false;
|
||||
}
|
||||
@ -99,6 +100,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||
}
|
||||
|
||||
if (!$this->group) {
|
||||
// TRANS: Client error displayed when trying to update logo settings for a non-existing group.
|
||||
$this->clientError(_('No such group.'), 404);
|
||||
return false;
|
||||
}
|
||||
@ -106,6 +108,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||
$cur = common_current_user();
|
||||
|
||||
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);
|
||||
return false;
|
||||
}
|
||||
@ -136,9 +139,9 @@ class GrouplogoAction extends GroupDesignAction
|
||||
*
|
||||
* @return string Title of the page
|
||||
*/
|
||||
|
||||
function title()
|
||||
{
|
||||
// TRANS: Title for group logo settings page.
|
||||
return _('Group logo');
|
||||
}
|
||||
|
||||
@ -147,9 +150,10 @@ class GrouplogoAction extends GroupDesignAction
|
||||
*
|
||||
* @return instructions for use
|
||||
*/
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -160,7 +164,6 @@ class GrouplogoAction extends GroupDesignAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showContent()
|
||||
{
|
||||
if ($this->mode == 'crop') {
|
||||
@ -178,6 +181,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||
|
||||
if (!$profile) {
|
||||
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.'));
|
||||
return;
|
||||
}
|
||||
@ -192,6 +196,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||
common_local_url('grouplogo',
|
||||
array('nickname' => $this->group->nickname))));
|
||||
$this->elementStart('fieldset');
|
||||
// TRANS: Group logo form legend.
|
||||
$this->element('legend', null, _('Group logo'));
|
||||
$this->hidden('token', common_session_token());
|
||||
|
||||
@ -199,6 +204,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||
if ($original) {
|
||||
$this->elementStart('li', array('id' => 'avatar_original',
|
||||
'class' => 'avatar_view'));
|
||||
// TRANS: Uploaded original file in group logo form.
|
||||
$this->element('h2', null, _("Original"));
|
||||
$this->elementStart('div', array('id'=>'avatar_original_view'));
|
||||
$this->element('img', array('src' => $this->group->original_logo,
|
||||
@ -210,6 +216,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||
if ($this->group->homepage_logo) {
|
||||
$this->elementStart('li', array('id' => 'avatar_preview',
|
||||
'class' => 'avatar_view'));
|
||||
// TRANS: Header for preview of to be displayed group logo.
|
||||
$this->element('h2', null, _("Preview"));
|
||||
$this->elementStart('div', array('id'=>'avatar_preview_view'));
|
||||
$this->element('img', array('src' => $this->group->homepage_logo,
|
||||
@ -233,6 +240,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||
|
||||
$this->elementStart('ul', 'form_actions');
|
||||
$this->elementStart('li');
|
||||
// TRANS: Submit button for uploading a group logo.
|
||||
$this->submit('upload', _('Upload'));
|
||||
$this->elementEnd('li');
|
||||
$this->elementEnd('ul');
|
||||
@ -251,6 +259,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||
common_local_url('grouplogo',
|
||||
array('nickname' => $this->group->nickname))));
|
||||
$this->elementStart('fieldset');
|
||||
// TRANS: Legend for group logo settings fieldset.
|
||||
$this->element('legend', null, _('Avatar settings'));
|
||||
$this->hidden('token', common_session_token());
|
||||
|
||||
@ -259,6 +268,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||
$this->elementStart('li',
|
||||
array('id' => 'avatar_original',
|
||||
'class' => 'avatar_view'));
|
||||
// TRANS: Header for originally uploaded file before a crop on the group logo page.
|
||||
$this->element('h2', null, _("Original"));
|
||||
$this->elementStart('div', array('id'=>'avatar_original_view'));
|
||||
$this->element('img', array('src' => Avatar::url($this->filedata['filename']),
|
||||
@ -271,6 +281,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||
$this->elementStart('li',
|
||||
array('id' => 'avatar_preview',
|
||||
'class' => 'avatar_view'));
|
||||
// TRANS: Header for the cropped group logo on the group logo page.
|
||||
$this->element('h2', null, _("Preview"));
|
||||
$this->elementStart('div', array('id'=>'avatar_preview_view'));
|
||||
$this->element('img', array('src' => Avatar::url($this->filedata['filename']),
|
||||
@ -286,6 +297,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||
'id' => $crop_info));
|
||||
}
|
||||
|
||||
// TRANS: Button text for cropping an uploaded group logo.
|
||||
$this->submit('crop', _('Crop'));
|
||||
|
||||
$this->elementEnd('li');
|
||||
@ -302,13 +314,13 @@ class GrouplogoAction extends GroupDesignAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handlePost()
|
||||
{
|
||||
// CSRF protection
|
||||
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
// TRANS: Form validation error message.
|
||||
$this->show_form(_('There was a problem with your session token. '.
|
||||
'Try again, please.'));
|
||||
return;
|
||||
@ -319,6 +331,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||
} else if ($this->arg('crop')) {
|
||||
$this->cropLogo();
|
||||
} else {
|
||||
// TRANS: Form validation error message when an unsupported argument is used.
|
||||
$this->showForm(_('Unexpected form submission.'));
|
||||
}
|
||||
}
|
||||
@ -331,7 +344,6 @@ class GrouplogoAction extends GroupDesignAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function uploadLogo()
|
||||
{
|
||||
try {
|
||||
@ -362,6 +374,7 @@ class GrouplogoAction extends GroupDesignAction
|
||||
|
||||
$this->mode = 'crop';
|
||||
|
||||
// TRANS: Form instructions on the group logo page.
|
||||
$this->showForm(_('Pick a square area of the image to be the logo.'),
|
||||
true);
|
||||
}
|
||||
@ -371,12 +384,12 @@ class GrouplogoAction extends GroupDesignAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function cropLogo()
|
||||
{
|
||||
$filedata = $_SESSION['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.'));
|
||||
return;
|
||||
}
|
||||
@ -396,8 +409,10 @@ class GrouplogoAction extends GroupDesignAction
|
||||
@unlink($filedata['filepath']);
|
||||
unset($_SESSION['FILEDATA']);
|
||||
$this->mode = 'upload';
|
||||
// TRANS: Form success message after updating a group logo.
|
||||
$this->showForm(_('Logo updated.'), true);
|
||||
} else {
|
||||
// TRANS: Form failure message after failing to update a group logo.
|
||||
$this->showForm(_('Failed updating logo.'));
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,6 @@ require_once INSTALLDIR.'/lib/jabber.php';
|
||||
*
|
||||
* @see SettingsAction
|
||||
*/
|
||||
|
||||
class ImsettingsAction extends ConnectSettingsAction
|
||||
{
|
||||
/**
|
||||
@ -53,7 +52,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return string Title of the page
|
||||
*/
|
||||
|
||||
function title()
|
||||
{
|
||||
// TRANS: Title for instance messaging settings.
|
||||
@ -65,7 +63,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return instructions for use
|
||||
*/
|
||||
|
||||
function getInstructions()
|
||||
{
|
||||
// TRANS: Instant messaging settings page instructions.
|
||||
@ -85,7 +82,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showContent()
|
||||
{
|
||||
if (!common_config('xmpp', 'enabled')) {
|
||||
@ -194,7 +190,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return Confirm_address address object for this user
|
||||
*/
|
||||
|
||||
function getConfirmation()
|
||||
{
|
||||
$user = common_current_user();
|
||||
@ -221,7 +216,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handlePost()
|
||||
{
|
||||
// CSRF protection
|
||||
@ -254,7 +248,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function savePreferences()
|
||||
{
|
||||
$jabbernotify = $this->boolean('jabbernotify');
|
||||
@ -280,7 +273,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||
if ($result === false) {
|
||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||
// TRANS: Server error thrown on database error updating IM preferences.
|
||||
$this->serverError(_('Couldn\'t update user.'));
|
||||
$this->serverError(_('Could not update user.'));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -298,7 +291,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function addAddress()
|
||||
{
|
||||
$user = common_current_user();
|
||||
@ -348,7 +340,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||
if ($result === false) {
|
||||
common_log_db_error($confirm, 'INSERT', __FILE__);
|
||||
// TRANS: Server error thrown on database error adding IM confirmation code.
|
||||
$this->serverError(_('Couldn\'t insert confirmation code.'));
|
||||
$this->serverError(_('Could not insert confirmation code.'));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -374,7 +366,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function cancelConfirmation()
|
||||
{
|
||||
$jabber = $this->arg('jabber');
|
||||
@ -397,7 +388,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||
if (!$result) {
|
||||
common_log_db_error($confirm, 'DELETE', __FILE__);
|
||||
// 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;
|
||||
}
|
||||
|
||||
@ -412,7 +403,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function removeAddress()
|
||||
{
|
||||
$user = common_current_user();
|
||||
@ -439,7 +429,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||
if (!$result) {
|
||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||
// TRANS: Server error thrown on database error removing a registered IM address.
|
||||
$this->serverError(_('Couldn\'t update user.'));
|
||||
$this->serverError(_('Could not update user.'));
|
||||
return;
|
||||
}
|
||||
$user->query('COMMIT');
|
||||
@ -459,7 +449,6 @@ class ImsettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return boolean whether the Jabber ID exists
|
||||
*/
|
||||
|
||||
function jabberExists($jabber)
|
||||
{
|
||||
$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
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class LicenseadminpanelAction extends AdminPanelAction
|
||||
{
|
||||
|
||||
@ -61,7 +60,6 @@ class LicenseadminpanelAction extends AdminPanelAction
|
||||
*
|
||||
* @return string instructions
|
||||
*/
|
||||
|
||||
function getInstructions()
|
||||
{
|
||||
return _('License for this StatusNet site');
|
||||
@ -72,7 +70,6 @@ class LicenseadminpanelAction extends AdminPanelAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showForm()
|
||||
{
|
||||
$form = new LicenseAdminPanelForm($this);
|
||||
@ -85,7 +82,6 @@ class LicenseadminpanelAction extends AdminPanelAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function saveSettings()
|
||||
{
|
||||
static $settings = array(
|
||||
@ -128,7 +124,6 @@ class LicenseadminpanelAction extends AdminPanelAction
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
|
||||
function validate(&$values)
|
||||
{
|
||||
// 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
|
||||
*/
|
||||
|
||||
function id()
|
||||
{
|
||||
return 'licenseadminpanel';
|
||||
@ -208,7 +202,6 @@ class LicenseAdminPanelForm extends AdminForm
|
||||
*
|
||||
* @return string class of the form
|
||||
*/
|
||||
|
||||
function formClass()
|
||||
{
|
||||
return 'form_settings';
|
||||
@ -312,7 +305,6 @@ class LicenseAdminPanelForm extends AdminForm
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function formActions()
|
||||
{
|
||||
$this->out->submit(
|
||||
|
@ -181,7 +181,7 @@ class OthersettingsAction extends AccountSettingsAction
|
||||
if ($result === false) {
|
||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||
// TRANS: Server error displayed when "Other" settings in user profile could not be updated on the server.
|
||||
$this->serverError(_('Couldn\'t update user.'));
|
||||
$this->serverError(_('Could not update user.'));
|
||||
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
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class ProfilesettingsAction extends AccountSettingsAction
|
||||
{
|
||||
/**
|
||||
@ -54,7 +53,6 @@ class ProfilesettingsAction extends AccountSettingsAction
|
||||
*
|
||||
* @return string Title of the page
|
||||
*/
|
||||
|
||||
function title()
|
||||
{
|
||||
// TRANS: Page title for profile settings.
|
||||
@ -66,7 +64,6 @@ class ProfilesettingsAction extends AccountSettingsAction
|
||||
*
|
||||
* @return instructions for use
|
||||
*/
|
||||
|
||||
function getInstructions()
|
||||
{
|
||||
// TRANS: Usage instructions for profile settings.
|
||||
@ -87,7 +84,6 @@ class ProfilesettingsAction extends AccountSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showContent()
|
||||
{
|
||||
$user = common_current_user();
|
||||
@ -212,7 +208,6 @@ class ProfilesettingsAction extends AccountSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handlePost()
|
||||
{
|
||||
// CSRF protection
|
||||
@ -323,7 +318,7 @@ class ProfilesettingsAction extends AccountSettingsAction
|
||||
if ($result === false) {
|
||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||
// 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;
|
||||
} else {
|
||||
// Re-initialize language environment if it changed
|
||||
@ -348,7 +343,7 @@ class ProfilesettingsAction extends AccountSettingsAction
|
||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||
// TRANS: Server error thrown when user profile settings could not be updated to
|
||||
// TRANS: automatically subscribe to any subscriber.
|
||||
$this->serverError(_('Couldn\'t update user for autosubscribe.'));
|
||||
$this->serverError(_('Could not update user for autosubscribe.'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -406,7 +401,7 @@ class ProfilesettingsAction extends AccountSettingsAction
|
||||
if ($result === false) {
|
||||
common_log_db_error($prefs, ($exists) ? 'UPDATE' : 'INSERT', __FILE__);
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
@ -419,7 +414,7 @@ class ProfilesettingsAction extends AccountSettingsAction
|
||||
if ($result === false) {
|
||||
common_log_db_error($profile, 'UPDATE', __FILE__);
|
||||
// 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;
|
||||
}
|
||||
|
||||
@ -428,7 +423,7 @@ class ProfilesettingsAction extends AccountSettingsAction
|
||||
|
||||
if (!$result) {
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,6 @@ require_once INSTALLDIR.'/extlib/libomb/profile.php';
|
||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class RemotesubscribeAction extends Action
|
||||
{
|
||||
var $nickname;
|
||||
@ -173,14 +172,14 @@ class RemotesubscribeAction extends Action
|
||||
if ($service->getServiceURI(OAUTH_ENDPOINT_REQUEST) ==
|
||||
common_local_url('requesttoken') ||
|
||||
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;
|
||||
}
|
||||
|
||||
try {
|
||||
$service->requestToken();
|
||||
} catch (OMB_RemoteServiceException $e) {
|
||||
$this->showForm(_('Couldn’t get a request token.'));
|
||||
$this->showForm(_('Could not get a request token.'));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -204,4 +203,3 @@ class RemotesubscribeAction extends Action
|
||||
common_redirect($target_url, 303);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -41,7 +41,6 @@ if (!defined('STATUSNET')) {
|
||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class RepeatAction extends Action
|
||||
{
|
||||
var $user = null;
|
||||
@ -73,7 +72,7 @@ class RepeatAction extends Action
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@ -101,7 +100,6 @@ class RepeatAction extends Action
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handle($args)
|
||||
{
|
||||
$repeat = $this->notice->repeat($this->user->id, 'web');
|
||||
|
@ -44,7 +44,6 @@ require_once INSTALLDIR.'/lib/connectsettingsaction.php';
|
||||
*
|
||||
* @see SettingsAction
|
||||
*/
|
||||
|
||||
class SmssettingsAction extends ConnectSettingsAction
|
||||
{
|
||||
/**
|
||||
@ -52,7 +51,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return string Title of the page
|
||||
*/
|
||||
|
||||
function title()
|
||||
{
|
||||
// TRANS: Title for SMS settings.
|
||||
@ -64,7 +62,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return instructions for use
|
||||
*/
|
||||
|
||||
function getInstructions()
|
||||
{
|
||||
// XXX: For consistency of parameters in messages, this should be a
|
||||
@ -88,7 +85,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showContent()
|
||||
{
|
||||
if (!common_config('sms', 'enabled')) {
|
||||
@ -219,7 +215,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @todo very similar to EmailsettingsAction::getConfirmation(); refactor?
|
||||
*/
|
||||
|
||||
function getConfirmation()
|
||||
{
|
||||
$user = common_current_user();
|
||||
@ -246,7 +241,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handlePost()
|
||||
{
|
||||
// CSRF protection
|
||||
@ -285,7 +279,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function savePreferences()
|
||||
{
|
||||
$smsnotify = $this->boolean('smsnotify');
|
||||
@ -305,7 +298,7 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
if ($result === false) {
|
||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||
// TRANS: Server error thrown on database error updating SMS preferences.
|
||||
$this->serverError(_('Couldn\'t update user.'));
|
||||
$this->serverError(_('Could not update user.'));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -323,7 +316,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function addAddress()
|
||||
{
|
||||
$user = common_current_user();
|
||||
@ -370,7 +362,7 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
if ($result === false) {
|
||||
common_log_db_error($confirm, 'INSERT', __FILE__);
|
||||
// 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;
|
||||
}
|
||||
|
||||
@ -395,7 +387,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function cancelConfirmation()
|
||||
{
|
||||
$sms = $this->trimmed('sms');
|
||||
@ -419,7 +410,7 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
if (!$result) {
|
||||
common_log_db_error($confirm, 'DELETE', __FILE__);
|
||||
// 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;
|
||||
}
|
||||
|
||||
@ -432,7 +423,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function removeAddress()
|
||||
{
|
||||
$user = common_current_user();
|
||||
@ -461,7 +451,7 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
if (!$result) {
|
||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||
// 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;
|
||||
}
|
||||
$user->query('COMMIT');
|
||||
@ -479,7 +469,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return boolean does the number exist
|
||||
*/
|
||||
|
||||
function smsExists($sms)
|
||||
{
|
||||
$user = common_current_user();
|
||||
@ -498,7 +487,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function carrierSelect()
|
||||
{
|
||||
$carrier = new Sms_carrier();
|
||||
@ -538,7 +526,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function confirmCode()
|
||||
{
|
||||
$code = $this->trimmed('code');
|
||||
@ -559,7 +546,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function removeIncoming()
|
||||
{
|
||||
$user = common_current_user();
|
||||
@ -575,7 +561,7 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
|
||||
if (!$user->updateKeys($orig)) {
|
||||
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);
|
||||
@ -588,7 +574,6 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
*
|
||||
* @see Emailsettings::newIncoming
|
||||
*/
|
||||
|
||||
function newIncoming()
|
||||
{
|
||||
$user = common_current_user();
|
||||
@ -599,7 +584,7 @@ class SmssettingsAction extends ConnectSettingsAction
|
||||
|
||||
if (!$user->updateKeys($orig)) {
|
||||
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);
|
||||
|
@ -46,7 +46,6 @@ require_once INSTALLDIR . '/lib/designsettings.php';
|
||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class UserDesignSettingsAction extends DesignSettingsAction
|
||||
{
|
||||
/**
|
||||
@ -70,7 +69,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
|
||||
*
|
||||
* @return string Title of the page
|
||||
*/
|
||||
|
||||
function title()
|
||||
{
|
||||
return _('Profile design');
|
||||
@ -81,7 +79,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
|
||||
*
|
||||
* @return instructions for use
|
||||
*/
|
||||
|
||||
function getInstructions()
|
||||
{
|
||||
return _('Customize the way your profile looks ' .
|
||||
@ -93,7 +90,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
|
||||
*
|
||||
* @return Design
|
||||
*/
|
||||
|
||||
function getWorkingDesign()
|
||||
{
|
||||
$user = common_current_user();
|
||||
@ -108,7 +104,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function showContent()
|
||||
{
|
||||
$design = $this->getWorkingDesign();
|
||||
@ -125,7 +120,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function saveDesign()
|
||||
{
|
||||
foreach ($this->args as $key => $val) {
|
||||
@ -168,7 +162,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
|
||||
$design = $user->getDesign();
|
||||
|
||||
if (!empty($design)) {
|
||||
|
||||
$original = clone($design);
|
||||
|
||||
$design->backgroundcolor = $bgcolor->intValue();
|
||||
@ -183,13 +176,11 @@ class UserDesignSettingsAction extends DesignSettingsAction
|
||||
|
||||
if ($result === false) {
|
||||
common_log_db_error($design, 'UPDATE', __FILE__);
|
||||
$this->showForm(_('Couldn\'t update your design.'));
|
||||
$this->showForm(_('Could not update your design.'));
|
||||
return;
|
||||
}
|
||||
|
||||
// update design
|
||||
} else {
|
||||
|
||||
$user->query('BEGIN');
|
||||
|
||||
// save new design
|
||||
@ -236,7 +227,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
|
||||
function sethd()
|
||||
{
|
||||
|
||||
@ -281,5 +271,4 @@ class UserDesignSettingsAction extends DesignSettingsAction
|
||||
|
||||
$this->showForm(_('Enjoy your hotdog!'), true);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -63,8 +63,13 @@ if (!function_exists('dl')) {
|
||||
// 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.
|
||||
// Callers will be suppressing warnings anyway.
|
||||
$disabled = array_filter(array_map('trim', explode(',', ini_get('disable_functions'))));
|
||||
if (!in_array('dl', $disabled)) {
|
||||
try {
|
||||
// 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) {
|
||||
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()
|
||||
{
|
||||
if (!Event::handle('StartRegistrationTry', array($this))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (common_config('site', 'closed')) {
|
||||
// TRANS: Client error trying to register with registrations not allowed.
|
||||
$this->clientError(_m('Registration not allowed.'));
|
||||
@ -297,6 +301,8 @@ class FBConnectauthAction extends Action
|
||||
common_debug('Facebook Connect Plugin - ' .
|
||||
"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)),
|
||||
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
|
||||
|
||||
if (!Event::handle('StartRegistrationTry', array($this))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (common_config('site', 'closed')) {
|
||||
// TRANS: OpenID plugin message. No new user registration is allowed on the site.
|
||||
$this->clientError(_m('Registration not allowed.'));
|
||||
@ -374,6 +378,9 @@ class FinishopenidloginAction extends Action
|
||||
common_rememberme($user);
|
||||
}
|
||||
unset($_SESSION['openid_rememberme']);
|
||||
|
||||
Event::handle('EndRegistrationTry', array($this));
|
||||
|
||||
common_redirect(common_local_url('showstream', array('nickname' => $user->nickname)),
|
||||
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.
|
||||
*
|
||||
* @param Action $action Action that is being executed
|
||||
* @param Profile $profile new user's profile
|
||||
* @param User $user new user
|
||||
*
|
||||
* @return boolean hook value
|
||||
*
|
||||
*/
|
||||
|
||||
function onEndRegistrationTry($action)
|
||||
function onEndUserRegister($profile, $user)
|
||||
{
|
||||
$ipaddress = $this->_getIpAddress();
|
||||
|
||||
if (empty($ipaddress)) {
|
||||
throw new ServerException(_m('Cannot find IP address.'));
|
||||
}
|
||||
|
||||
$user = common_current_user();
|
||||
|
||||
if (empty($user)) {
|
||||
throw new ServerException(_m('Cannot find user after successful registration.'));
|
||||
// User registration can happen from command-line scripts etc.
|
||||
return true;
|
||||
}
|
||||
|
||||
$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 ""
|
||||
"Project-Id-Version: StatusNet - SQLProfile\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-01-14 23:32+0000\n"
|
||||
"PO-Revision-Date: 2011-01-14 23:37:11+0000\n"
|
||||
"POT-Creation-Date: 2011-01-20 19:03+0000\n"
|
||||
"PO-Revision-Date: 2011-01-20 19:08:00+0000\n"
|
||||
"Language-Team: Dutch <http://translatewiki.net/wiki/Portal:nl>\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-POT-Import-Date: 2011-01-14 14:17:53+0000\n"
|
||||
"X-Generator: MediaWiki 1.18alpha (r80343); Translate extension (2010-09-17)\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: nl\n"
|
||||
"X-Message-Group: #out-statusnet-plugin-sqlprofile\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: SQLProfilePlugin.php:41
|
||||
#, fuzzy
|
||||
msgid "Debug tool to watch for poorly indexed DB queries."
|
||||
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()
|
||||
{
|
||||
if (!Event::handle('StartRegistrationTry', array($this))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (common_config('site', 'closed')) {
|
||||
$this->clientError(_m('Registration not allowed.'));
|
||||
return;
|
||||
@ -490,6 +494,8 @@ class TwitterauthorizationAction extends Action
|
||||
common_debug('TwitterBridge Plugin - ' .
|
||||
"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)),
|
||||
303);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user