summaryrefslogtreecommitdiff
path: root/plugins/TwitterBridge/TwitterBridgePlugin.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-03-03 01:49:14 +0000
committerZach Copley <zach@status.net>2010-03-03 01:49:14 +0000
commit32c08f53de83cbc512b0e69fc0994601f67d9582 (patch)
treec9ded69b77d8530770a4ec1be31a03f2fc0fd7c0 /plugins/TwitterBridge/TwitterBridgePlugin.php
parent097e3f89b630b7a28f27c96f5e9a036df3ed7710 (diff)
Show global key and secret, if defined, in Twitter bridge admin panel
Diffstat (limited to 'plugins/TwitterBridge/TwitterBridgePlugin.php')
-rw-r--r--plugins/TwitterBridge/TwitterBridgePlugin.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/TwitterBridge/TwitterBridgePlugin.php b/plugins/TwitterBridge/TwitterBridgePlugin.php
index bc702e745..1a0a69682 100644
--- a/plugins/TwitterBridge/TwitterBridgePlugin.php
+++ b/plugins/TwitterBridge/TwitterBridgePlugin.php
@@ -88,15 +88,15 @@ class TwitterBridgePlugin extends Plugin
static function hasKeys()
{
- $key = common_config('twitter', 'consumer_key');
- $secret = common_config('twitter', 'consumer_secret');
+ $ckey = common_config('twitter', 'consumer_key');
+ $csecret = common_config('twitter', 'consumer_secret');
- if (empty($key) && empty($secret)) {
- $key = common_config('twitter', 'global_consumer_key');
- $secret = common_config('twitter', 'global_consumer_secret');
+ if (empty($ckey) && empty($csecret)) {
+ $ckey = common_config('twitter', 'global_consumer_key');
+ $csecret = common_config('twitter', 'global_consumer_secret');
}
- if (!empty($key) && !empty($secret)) {
+ if (!empty($ckey) && !empty($csecret)) {
return true;
}
@@ -115,6 +115,8 @@ class TwitterBridgePlugin extends Plugin
function onRouterInitialized($m)
{
+ $m->connect('admin/twitter', array('action' => 'twitteradminpanel'));
+
if (self::hasKeys()) {
$m->connect(
'twitter/authorization',
@@ -133,8 +135,6 @@ class TwitterBridgePlugin extends Plugin
}
}
- $m->connect('admin/twitter', array('action' => 'twitteradminpanel'));
-
return true;
}