* @see SettingsAction
*/
class FacebooksettingsAction extends ConnectSettingsAction {
-
private $facebook; // Facebook PHP-SDK client obj
private $flink;
private $user;
* @return void
*/
function showContent() {
-
if (!empty($this->flink)) {
$this->elementStart(
$this->element('legend', null, _m('Disconnect my account from Facebook'));
if (empty($this->user->password)) {
-
$this->elementStart('p', array('class' => 'form_guide'));
$msg = sprintf(
$this->raw(common_markup_to_html($msg));
$this->elementEnd('p');
-
} else {
-
+ // @todo FIXME: i18n: This message is not being used.
$msg = sprintf(
+ // TRANS: Message displayed when initiating disconnect of a StatusNet user
+ // TRANS: from a Facebook account. %1$s is the StatusNet site name.
_m(
'Keep your %1$s account but disconnect from Facebook. ' .
- 'You\'ll use your 1%$s password to log in.'
+ 'You\'ll use your %1$s password to log in.'
),
common_config('site', 'name')
);
* @return void
*/
function saveSettings() {
-
$noticesync = $this->boolean('noticesync');
$replysync = $this->boolean('replysync');
* and shows the user a success message if all goes well.
*/
function disconnect() {
-
$result = $this->flink->delete();
$this->flink = null;
$this->showForm(_m('You have disconnected from Facebook.'), true);
}
-
}