diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-05-11 17:53:23 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-05-11 17:53:23 -0400 |
commit | 99f8501d321ae9d8087abbe6523e28ce5fd095d3 (patch) | |
tree | fb721b4360f0748df3cb3b522565ad4566422555 /actions/twittersettings.php | |
parent | 7f0e57598a5837bbb87f197baa147be29c7df531 (diff) | |
parent | 251fd2c232d96ea09db971a6608231c679395c01 (diff) |
Merge branch '0.8.x' of git@gitorious.org:laconica/dev into 0.8.x
Conflicts:
config.php.sample
Diffstat (limited to 'actions/twittersettings.php')
-rw-r--r-- | actions/twittersettings.php | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/actions/twittersettings.php b/actions/twittersettings.php index 580d9ecf7..2b742788e 100644 --- a/actions/twittersettings.php +++ b/actions/twittersettings.php @@ -158,13 +158,22 @@ class TwittersettingsAction extends ConnectSettingsAction ($flink->friendsync & FOREIGN_FRIEND_RECV) : false); $this->elementEnd('li'); - $this->elementStart('li'); - $this->checkbox('noticerecv', - _('Import my Friends Timeline.'), - ($flink) ? - ($flink->noticesync & FOREIGN_NOTICE_RECV) : - false); - $this->elementEnd('li'); + + if (common_config('twitterbridge','enabled')) { + $this->elementStart('li'); + $this->checkbox('noticerecv', + _('Import my Friends Timeline.'), + ($flink) ? + ($flink->noticesync & FOREIGN_NOTICE_RECV) : + false); + $this->elementEnd('li'); + } else { + // preserve setting even if bidrection bridge toggled off + if ($flink && ($flink->noticesync & FOREIGN_NOTICE_RECV)) { + $this->hidden('noticerecv', true, 'noticerecv'); + } + } + $this->elementEnd('ul'); if ($flink) { @@ -383,6 +392,8 @@ class TwittersettingsAction extends ConnectSettingsAction if ($friendsync) { save_twitter_friends($user, $twit_user->id, $screen_name, $password); + $flink->last_friendsync = common_sql_now(); + $flink->update(); } $this->showForm(_('Twitter settings saved.'), true); |