From 4b0e5ff271d4ac0af3256b2716f1e1362ddb02d8 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Thu, 7 May 2009 14:07:03 -0700 Subject: [PATCH 1/2] Added Twitter to notice sources --- db/notice_source.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/db/notice_source.sql b/db/notice_source.sql index ce44f32354..e6e2180a57 100644 --- a/db/notice_source.sql +++ b/db/notice_source.sql @@ -43,6 +43,7 @@ VALUES ('twidge','Twidge','http://software.complete.org/twidge', now()), ('twidroid','twidroid','http://www.twidroid.com/', now()), ('twittelator','Twittelator','http://www.stone.com/iPhone/Twittelator/', now()), + ('twitter','Twitter','http://twitter.com/', now()), ('twitterfeed','twitterfeed','http://twitterfeed.com/', now()), ('twitterphoto','TwitterPhoto','http://richfish.org/twitterphoto/', now()), ('twitterpm','Net::Twitter','http://search.cpan.org/dist/Net-Twitter/', now()), From fbf23ae0ee4c8c63e80e3511aa7fce980b8d1ed5 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Thu, 7 May 2009 14:41:53 -0700 Subject: [PATCH 2/2] Only show import friends timeline option if bidirectional bridge enabled --- actions/twittersettings.php | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/actions/twittersettings.php b/actions/twittersettings.php index 580d9ecf76..1bce576951 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) {