From c56939d59632560e93d1e4f3b29713c3cfdb61c6 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 2 Aug 2010 13:00:50 -0700 Subject: 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.) --- plugins/TwitterBridge/TwitterBridgePlugin.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'plugins/TwitterBridge/TwitterBridgePlugin.php') diff --git a/plugins/TwitterBridge/TwitterBridgePlugin.php b/plugins/TwitterBridge/TwitterBridgePlugin.php index 65b3a6b38..0505a328f 100644 --- a/plugins/TwitterBridge/TwitterBridgePlugin.php +++ b/plugins/TwitterBridge/TwitterBridgePlugin.php @@ -50,6 +50,7 @@ class TwitterBridgePlugin extends Plugin { const VERSION = STATUSNET_VERSION; + public $adminImportControl = false; // Should the 'import' checkbox be exposed in the admin panel? /** * Initializer for the plugin. @@ -322,5 +323,17 @@ class TwitterBridgePlugin extends Plugin return true; } + /** + * Expose the adminImportControl setting to the administration panel code. + * This allows us to disable the import bridge enabling checkbox for administrators, + * since on a bulk farm site we can't yet automate the import daemon setup. + * + * @return boolean hook value; + */ + function onTwitterBridgeAdminImportControl() + { + return (bool)$this->adminImportControl; + } + } -- cgit v1.2.3-54-g00ecf