summaryrefslogtreecommitdiff
path: root/plugins/TwitterBridge/twitteradminpanel.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-08-10 23:36:13 -0700
committerEvan Prodromou <evan@status.net>2010-08-10 23:36:13 -0700
commit41dfea163460bb216483e8e12fff7a8afefbb4fb (patch)
tree8049f397c1a39b1a49a7a0d3d6eac707f5f13e14 /plugins/TwitterBridge/twitteradminpanel.php
parent3062cc270607ad60993e5e6d6e3977fab74508b0 (diff)
parent5c210f724a865830d0c39feba8386f495b18ee4f (diff)
Merge branch 'master' of gitorious.org:statusnet/mainline
Diffstat (limited to 'plugins/TwitterBridge/twitteradminpanel.php')
-rw-r--r--plugins/TwitterBridge/twitteradminpanel.php29
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');