forked from GNUsocial/gnu-social
Merge branch '1.0.x' into limitdist2
Conflicts: lib/groupnoticestream.php lib/taggedprofilenoticestream.php
This commit is contained in:
commit
e0d5093ee5
@ -169,15 +169,18 @@ class ApprovegroupAction extends Action
|
||||
$this->startHTML('text/xml;charset=utf-8');
|
||||
$this->elementStart('head');
|
||||
// TRANS: Title for leave group page after group join request is approved/disapproved.
|
||||
// TRANS: %1$s is the user nickname, %2$s is the group nickname.
|
||||
$this->element('title', null, sprintf(_m('TITLE','%1$s\'s request for %2$s'),
|
||||
$this->profile->nickname,
|
||||
$this->group->nickname));
|
||||
$this->elementEnd('head');
|
||||
$this->elementStart('body');
|
||||
if ($this->approve) {
|
||||
$this->element('p', 'success', _m('Join request approved.'));
|
||||
// TRANS: Message on page for group admin after approving a join request.
|
||||
$this->element('p', 'success', _('Join request approved.'));
|
||||
} elseif ($this->cancel) {
|
||||
$this->element('p', 'success', _m('Join request canceled.'));
|
||||
// TRANS: Message on page for group admin after rejecting a join request.
|
||||
$this->element('p', 'success', _('Join request canceled.'));
|
||||
}
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
|
@ -112,6 +112,6 @@ class CancelGroupForm extends Form
|
||||
function formActions()
|
||||
{
|
||||
// TRANS: Submit button text on form to cancel group join request.
|
||||
$this->out->submit('submit', _('BUTTON','Cancel join request'));
|
||||
$this->out->submit('submit', _m('BUTTON','Cancel join request'));
|
||||
}
|
||||
}
|
||||
|
@ -83,7 +83,6 @@ function save_twitter_user($twitter_id, $screen_name)
|
||||
$screen_name,
|
||||
$oldname));
|
||||
}
|
||||
|
||||
} else {
|
||||
// Kill any old, invalid records for this screen name
|
||||
$fuser = Foreign_user::getByNickname($screen_name, TWITTER_SERVICE);
|
||||
@ -279,7 +278,6 @@ function broadcast_oauth($notice, $flink) {
|
||||
}
|
||||
|
||||
if (empty($status)) {
|
||||
|
||||
// This could represent a failure posting,
|
||||
// or the Twitter API might just be behaving flakey.
|
||||
$errmsg = sprintf('Twitter bridge - No data returned by Twitter API when ' .
|
||||
@ -320,7 +318,20 @@ function process_error($e, $flink, $notice)
|
||||
|
||||
common_log(LOG_WARNING, $logmsg);
|
||||
|
||||
// http://dev.twitter.com/pages/responses_errors
|
||||
switch($code) {
|
||||
case 400:
|
||||
// Probably invalid data (bad Unicode chars or coords) that
|
||||
// cannot be resolved by just sending again.
|
||||
//
|
||||
// It could also be rate limiting, but retrying immediately
|
||||
// won't help much with that, so we'll discard for now.
|
||||
// If a facility for retrying things later comes up in future,
|
||||
// we can detect the rate-limiting headers and use that.
|
||||
//
|
||||
// Discard the message permanently.
|
||||
return true;
|
||||
break;
|
||||
case 401:
|
||||
// Probably a revoked or otherwise bad access token - nuke!
|
||||
remove_twitter_link($flink);
|
||||
@ -330,6 +341,13 @@ function process_error($e, $flink, $notice)
|
||||
// User has exceeder her rate limit -- toss the notice
|
||||
return true;
|
||||
break;
|
||||
case 404:
|
||||
// Resource not found. Shouldn't happen much on posting,
|
||||
// but just in case!
|
||||
//
|
||||
// Consider it a matter for tossing the notice.
|
||||
return true;
|
||||
break;
|
||||
default:
|
||||
|
||||
// For every other case, it's probably some flakiness so try
|
||||
@ -406,10 +424,14 @@ function mail_twitter_bridge_removed($user)
|
||||
|
||||
common_switch_locale($user->language);
|
||||
|
||||
$subject = sprintf(_m('Your Twitter bridge has been disabled.'));
|
||||
// TRANS: Mail subject after forwarding notices to Twitter has stopped working.
|
||||
$subject = sprintf(_m('Your Twitter bridge has been disabled'));
|
||||
|
||||
$site_name = common_config('site', 'name');
|
||||
|
||||
// TRANS: Mail body after forwarding notices to Twitter has stopped working.
|
||||
// TRANS: %1$ is the name of the user the mail is sent to, %2$s is a URL to the
|
||||
// TRANS: Twitter settings, %3$s is the StatusNet sitename.
|
||||
$body = sprintf(_m('Hi, %1$s. We\'re sorry to inform you that your ' .
|
||||
'link to Twitter has been disabled. We no longer seem to have ' .
|
||||
'permission to update your Twitter status. Did you maybe revoke ' .
|
||||
|
Loading…
Reference in New Issue
Block a user