X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FFacebook%2Ffacebooksettings.php;h=1379b9a9cca981f24479cd0d3b2979d3948ea6f2;hb=834acaaa794254dfb9dc7e57dab498001d975d11;hp=766d0e19963b734a9c736fcbe49a753eec83c2c2;hpb=a5c11cc92a277c3af6f9b18b1ffaf6dc5f90f5cc;p=quix0rs-gnu-social.git diff --git a/plugins/Facebook/facebooksettings.php b/plugins/Facebook/facebooksettings.php index 766d0e1996..1379b9a9cc 100644 --- a/plugins/Facebook/facebooksettings.php +++ b/plugins/Facebook/facebooksettings.php @@ -25,7 +25,6 @@ require_once INSTALLDIR . '/plugins/Facebook/facebookaction.php'; class FacebooksettingsAction extends FacebookAction { - function handle($args) { parent::handle($args); @@ -40,7 +39,6 @@ class FacebooksettingsAction extends FacebookAction * * @return void */ - function showContent() { if ($this->arg('save')) { @@ -54,25 +52,15 @@ class FacebooksettingsAction extends FacebookAction $noticesync = $this->boolean('noticesync'); $replysync = $this->boolean('replysync'); - $prefix = $this->trimmed('prefix'); $original = clone($this->flink); $this->flink->set_flags($noticesync, false, $replysync, false); $result = $this->flink->update($original); - if ($prefix == '' || $prefix == '0') { - // Facebook bug: saving empty strings to prefs now fails - // http://bugs.developers.facebook.com/show_bug.cgi?id=7110 - $trimmed = $prefix . ' '; - } else { - $trimmed = substr($prefix, 0, 128); - } - $this->facebook->api_client->data_setUserPreference(FACEBOOK_NOTICE_PREFIX, - $trimmed); - if ($result === false) { $this->showForm(_m('There was a problem saving your sync preferences!')); } else { + // TRANS: Confirmation that synchronisation settings have been saved into the system. $this->showForm(_m('Sync preferences saved.'), true); } } @@ -110,26 +98,16 @@ class FacebooksettingsAction extends FacebookAction $this->elementStart('li'); - $prefix = trim($this->facebook->api_client->data_getUserPreference(FACEBOOK_NOTICE_PREFIX)); - - $this->input('prefix', _m('Prefix'), - ($prefix) ? $prefix : null, - _m('A string to prefix notices with.')); - - $this->elementEnd('li'); - - $this->elementStart('li'); - - $this->submit('save', _m('Save')); + // TRANS: Submit button to save synchronisation settings. + $this->submit('save', _m('BUTTON','Save')); $this->elementEnd('li'); $this->elementEnd('ul'); $this->elementEnd('form'); - } else { - + // TRANS: %s is the application name. $instructions = sprintf(_m('If you would like %s to automatically update ' . 'your Facebook status with your latest notice, you need ' . 'to give it permission.'), $this->app_name); @@ -148,12 +126,11 @@ class FacebooksettingsAction extends FacebookAction $this->elementEnd('li'); $this->elementEnd('ul'); } - } function title() { + // TRANS: Page title for synchronisation settings. return _m('Sync preferences'); } - }