]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Only show import friends timeline option if bidirectional bridge enabled
authorZach Copley <zach@controlyourself.ca>
Thu, 7 May 2009 21:41:53 +0000 (14:41 -0700)
committerZach Copley <zach@controlyourself.ca>
Thu, 7 May 2009 21:41:53 +0000 (14:41 -0700)
actions/twittersettings.php

index 580d9ecf761d8ca0f80642842cc6d21317a6096f..1bce5769511734396822ea5f94e94382d85d2a69 100644 (file)
@@ -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) {