Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x-mobile
This commit is contained in:
commit
7d763740f1
@ -58,8 +58,15 @@ class FacebooksettingsAction extends FacebookAction
|
|||||||
$this->flink->set_flags($noticesync, $replysync, false, false);
|
$this->flink->set_flags($noticesync, $replysync, false, false);
|
||||||
$result = $this->flink->update($original);
|
$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,
|
$this->facebook->api_client->data_setUserPreference(FACEBOOK_NOTICE_PREFIX,
|
||||||
substr($prefix, 0, 128));
|
$trimmed);
|
||||||
|
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
$this->showForm(_('There was a problem saving your sync preferences!'));
|
$this->showForm(_('There was a problem saving your sync preferences!'));
|
||||||
@ -101,7 +108,7 @@ class FacebooksettingsAction extends FacebookAction
|
|||||||
|
|
||||||
$this->elementStart('li');
|
$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'),
|
$this->input('prefix', _('Prefix'),
|
||||||
($prefix) ? $prefix : null,
|
($prefix) ? $prefix : null,
|
||||||
|
@ -99,8 +99,8 @@ function facebookBroadcastNotice($notice)
|
|||||||
// XXX: Does this call count against our per user FB request limit?
|
// XXX: Does this call count against our per user FB request limit?
|
||||||
// If so we should consider storing verb elsewhere or not storing
|
// If so we should consider storing verb elsewhere or not storing
|
||||||
|
|
||||||
$prefix = $facebook->api_client->data_getUserPreference(FACEBOOK_NOTICE_PREFIX,
|
$prefix = trim($facebook->api_client->data_getUserPreference(FACEBOOK_NOTICE_PREFIX,
|
||||||
$fbuid);
|
$fbuid));
|
||||||
|
|
||||||
$status = "$prefix $notice->content";
|
$status = "$prefix $notice->content";
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ RealtimeUpdate = {
|
|||||||
_replyurl: '',
|
_replyurl: '',
|
||||||
_favorurl: '',
|
_favorurl: '',
|
||||||
_deleteurl: '',
|
_deleteurl: '',
|
||||||
|
_updatecounter: 0,
|
||||||
|
|
||||||
init: function(userid, replyurl, favorurl, deleteurl)
|
init: function(userid, replyurl, favorurl, deleteurl)
|
||||||
{
|
{
|
||||||
@ -15,6 +16,8 @@ RealtimeUpdate = {
|
|||||||
RealtimeUpdate._favorurl = favorurl;
|
RealtimeUpdate._favorurl = favorurl;
|
||||||
RealtimeUpdate._deleteurl = deleteurl;
|
RealtimeUpdate._deleteurl = deleteurl;
|
||||||
|
|
||||||
|
DT = document.title;
|
||||||
|
|
||||||
$(window).blur(function() {
|
$(window).blur(function() {
|
||||||
$('#notices_primary .notice').css({
|
$('#notices_primary .notice').css({
|
||||||
'border-top-color':$('#notices_primary .notice:last').css('border-top-color'),
|
'border-top-color':$('#notices_primary .notice:last').css('border-top-color'),
|
||||||
@ -26,6 +29,9 @@ RealtimeUpdate = {
|
|||||||
'border-top-style':'solid'
|
'border-top-style':'solid'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
RealtimeUpdate._updatecounter = 0;
|
||||||
|
document.title = DT;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -45,6 +51,9 @@ RealtimeUpdate = {
|
|||||||
$("#notices_primary .notice:first").css({display:"none"});
|
$("#notices_primary .notice:first").css({display:"none"});
|
||||||
$("#notices_primary .notice:first").fadeIn(1000);
|
$("#notices_primary .notice:first").fadeIn(1000);
|
||||||
NoticeReply();
|
NoticeReply();
|
||||||
|
|
||||||
|
RealtimeUpdate._updatecounter += 1;
|
||||||
|
document.title = '('+RealtimeUpdate._updatecounter+') ' + DT;
|
||||||
}, 500);
|
}, 500);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user