diff options
author | Brion Vibber <brion@pobox.com> | 2010-08-02 13:00:50 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-08-02 13:00:50 -0700 |
commit | c56939d59632560e93d1e4f3b29713c3cfdb61c6 (patch) | |
tree | 0279103ba62c7748409849bc01d8f84c0760283e /plugins/TwitterBridge/twitteradminpanel.php | |
parent | 56294016a753c43c366bf4680da28a17cccc21d5 (diff) |
Remove the 'Enable Twitter import' checkbox from Twitter admin panel by default; can be re-added with setting:
addPlugin('TwitterBridge', array('adminImportControl' => true, ....));
Added a note on the label that it requires manual daemon setup. (Note that by default the admin panel won't be shown, so it's no biggie to be hiding this for now.)
Diffstat (limited to 'plugins/TwitterBridge/twitteradminpanel.php')
-rw-r--r-- | plugins/TwitterBridge/twitteradminpanel.php | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/plugins/TwitterBridge/twitteradminpanel.php b/plugins/TwitterBridge/twitteradminpanel.php index a78a92c66..69f8da078 100644 --- a/plugins/TwitterBridge/twitteradminpanel.php +++ b/plugins/TwitterBridge/twitteradminpanel.php @@ -92,9 +92,11 @@ class TwitteradminpanelAction extends AdminPanelAction ); static $booleans = array( - 'twitter' => array('signin'), - 'twitterimport' => array('enabled') + 'twitter' => array('signin') ); + if (Event::handle('TwitterBridgeAdminImportControl')) { + $booleans['twitterimport'] = array('enabled'); + } $values = array(); @@ -155,6 +157,13 @@ class TwitteradminpanelAction extends AdminPanelAction ); } } + + function isImportEnabled() + { + // Since daemon setup isn't automated yet... + // @todo: if merged into main queues, detect presence of daemon config + return true; + } } class TwitterAdminPanelForm extends AdminForm @@ -263,13 +272,15 @@ class TwitterAdminPanelForm extends AdminForm ); $this->unli(); - $this->li(); - $this->out->checkbox( - 'enabled', _m('Enable Twitter import'), - (bool) $this->value('enabled', 'twitterimport'), - _m('Allow users to import their Twitter friends\' timelines') - ); - $this->unli(); + if (Event::handle('TwitterBridgeAdminImportControl')) { + $this->li(); + $this->out->checkbox( + 'enabled', _m('Enable Twitter import'), + (bool) $this->value('enabled', 'twitterimport'), + _m('Allow users to import their Twitter friends\' timelines. Requires daemons to be manually configured.') + ); + $this->unli(); + } $this->out->elementEnd('ul'); |