diff options
author | Evan Prodromou <evan@status.net> | 2009-10-19 15:36:26 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-10-19 15:36:26 -0400 |
commit | 035d4cf86e8cd2bec46a9b24e098c798f3ec3cb3 (patch) | |
tree | de92e5245dffd047460b60425a3d4035d84d0435 /actions | |
parent | 90de6eae5a6195e4455a726d7183dbefc8eeb617 (diff) | |
parent | ce4ed6cca54134152c11baf8e0d0ff5b587b4998 (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'actions')
-rw-r--r-- | actions/facebooksettings.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/actions/facebooksettings.php b/actions/facebooksettings.php index 84bdde910..b2b1d6807 100644 --- a/actions/facebooksettings.php +++ b/actions/facebooksettings.php @@ -58,8 +58,15 @@ class FacebooksettingsAction extends FacebookAction $this->flink->set_flags($noticesync, $replysync, false, 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, - substr($prefix, 0, 128)); + $trimmed); if ($result === false) { $this->showForm(_('There was a problem saving your sync preferences!')); @@ -101,7 +108,7 @@ class FacebooksettingsAction extends FacebookAction $this->elementStart('li'); - $prefix = $this->facebook->api_client->data_getUserPreference(FACEBOOK_NOTICE_PREFIX); + $prefix = trim($this->facebook->api_client->data_getUserPreference(FACEBOOK_NOTICE_PREFIX)); $this->input('prefix', _('Prefix'), ($prefix) ? $prefix : null, |