diff options
author | Brion Vibber <brion@pobox.com> | 2010-01-27 17:39:03 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-01-27 17:39:03 -0800 |
commit | 0794ecf372ffff2e0cc93509ae3462ca0cbbc99c (patch) | |
tree | 79695c758dc0e919b5cbcaaf1260125f3e97c4a2 /plugins/TwitterBridge/TwitterBridgePlugin.php | |
parent | 2e0297bb6ff0fd2d3a37d811bd3305ce5d6a77ee (diff) | |
parent | 07d50a012af70d9bd35a26f645d791ae7ba29986 (diff) |
Merge branch 'testing' of gitorious.org:statusnet/mainline
Diffstat (limited to 'plugins/TwitterBridge/TwitterBridgePlugin.php')
-rw-r--r-- | plugins/TwitterBridge/TwitterBridgePlugin.php | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/plugins/TwitterBridge/TwitterBridgePlugin.php b/plugins/TwitterBridge/TwitterBridgePlugin.php index 57b3c1c99..c7f57ffc7 100644 --- a/plugins/TwitterBridge/TwitterBridgePlugin.php +++ b/plugins/TwitterBridge/TwitterBridgePlugin.php @@ -20,7 +20,8 @@ * @category Plugin * @package StatusNet * @author Zach Copley <zach@status.net> - * @copyright 2009 Control Yourself, Inc. + * @author Julien C <chaumond@gmail.com> + * @copyright 2009-2010 Control Yourself, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://laconi.ca/ */ @@ -41,6 +42,7 @@ define('TWITTERBRIDGEPLUGIN_VERSION', '0.9'); * @category Plugin * @package StatusNet * @author Zach Copley <zach@status.net> + * @author Julien C <chaumond@gmail.com> * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://laconi.ca/ * @link http://twitter.com/ @@ -72,6 +74,27 @@ class TwitterBridgePlugin extends Plugin $m->connect('twitter/authorization', array('action' => 'twitterauthorization')); $m->connect('settings/twitter', array('action' => 'twittersettings')); + $m->connect('main/twitterlogin', array('action' => 'twitterlogin')); + + return true; + } + + /* + * Add a login tab for 'Sign in with Twitter' + * + * @param Action &action the current action + * + * @return void + */ + function onEndLoginGroupNav(&$action) + { + + $action_name = $action->trimmed('action'); + + $action->menuItem(common_local_url('twitterlogin'), + _('Twitter'), + _('Login or register using Twitter'), + 'twitterlogin' === $action_name); return true; } @@ -108,6 +131,7 @@ class TwitterBridgePlugin extends Plugin switch ($cls) { case 'TwittersettingsAction': case 'TwitterauthorizationAction': + case 'TwitterloginAction': include_once INSTALLDIR . '/plugins/TwitterBridge/' . strtolower(mb_substr($cls, 0, -6)) . '.php'; return false; |