forked from GNUsocial/gnu-social
Fixed bug where reply-sync bit wasn't getting saved
This commit is contained in:
parent
b586063ebe
commit
e6842b7189
@ -52,21 +52,21 @@ class FacebooksettingsAction extends FacebookAction
|
|||||||
|
|
||||||
function saveSettings() {
|
function saveSettings() {
|
||||||
|
|
||||||
$noticesync = $this->arg('noticesync');
|
$noticesync = $this->boolean('noticesync');
|
||||||
$replysync = $this->arg('replysync');
|
$replysync = $this->boolean('replysync');
|
||||||
$prefix = $this->trimmed('prefix');
|
$prefix = $this->trimmed('prefix');
|
||||||
|
|
||||||
$original = clone($this->flink);
|
$original = clone($this->flink);
|
||||||
$this->flink->set_flags($noticesync, $replysync, false, false);
|
$this->flink->set_flags($noticesync, false, $replysync, false);
|
||||||
$result = $this->flink->update($original);
|
$result = $this->flink->update($original);
|
||||||
|
|
||||||
if ($prefix == '' || $prefix == '0') {
|
if ($prefix == '' || $prefix == '0') {
|
||||||
// Facebook bug: saving empty strings to prefs now fails
|
// Facebook bug: saving empty strings to prefs now fails
|
||||||
// http://bugs.developers.facebook.com/show_bug.cgi?id=7110
|
// http://bugs.developers.facebook.com/show_bug.cgi?id=7110
|
||||||
$trimmed = $prefix . ' ';
|
$trimmed = $prefix . ' ';
|
||||||
} else {
|
} else {
|
||||||
$trimmed = substr($prefix, 0, 128);
|
$trimmed = substr($prefix, 0, 128);
|
||||||
}
|
}
|
||||||
$this->facebook->api_client->data_setUserPreference(FACEBOOK_NOTICE_PREFIX,
|
$this->facebook->api_client->data_setUserPreference(FACEBOOK_NOTICE_PREFIX,
|
||||||
$trimmed);
|
$trimmed);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user