diff options
author | Zach Copley <zach@status.net> | 2010-03-01 22:41:07 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-03-01 22:41:07 -0800 |
commit | 27a49361eb8fd4dc661283214003a71de34201e8 (patch) | |
tree | 965da5bf4e8fc38fc20ad827896319ea7b637ecc /plugins/TwitterBridge/TwitterBridgePlugin.php | |
parent | 82c9714fca86edcfa3a54274f8fb1caadb355deb (diff) |
- Make 'Sign in with Twitter' optional
- Updates to the Twitter bridge plugin README
Diffstat (limited to 'plugins/TwitterBridge/TwitterBridgePlugin.php')
-rw-r--r-- | plugins/TwitterBridge/TwitterBridgePlugin.php | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/plugins/TwitterBridge/TwitterBridgePlugin.php b/plugins/TwitterBridge/TwitterBridgePlugin.php index ac08cc593..6ce69d5e2 100644 --- a/plugins/TwitterBridge/TwitterBridgePlugin.php +++ b/plugins/TwitterBridge/TwitterBridgePlugin.php @@ -96,7 +96,11 @@ class TwitterBridgePlugin extends Plugin array('action' => 'twitterauthorization') ); $m->connect('settings/twitter', array('action' => 'twittersettings')); - $m->connect('main/twitterlogin', array('action' => 'twitterlogin')); + + if (common_config('twitter', 'signin')) { + $m->connect('main/twitterlogin', array('action' => 'twitterlogin')); + } + $m->connect('admin/twitter', array('action' => 'twitteradminpanel')); return true; @@ -113,12 +117,14 @@ class TwitterBridgePlugin extends Plugin { $action_name = $action->trimmed('action'); - $action->menuItem( - common_local_url('twitterlogin'), - _m('Twitter'), - _m('Login or register using Twitter'), - 'twitterlogin' === $action_name - ); + if (common_config('twitter', 'signin')) { + $action->menuItem( + common_local_url('twitterlogin'), + _m('Twitter'), + _m('Login or register using Twitter'), + 'twitterlogin' === $action_name + ); + } return true; } |