summaryrefslogtreecommitdiff
path: root/plugins/TwitterBridge/twitteroauthclient.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-03-03 00:54:35 +0000
committerZach Copley <zach@status.net>2010-03-03 00:54:35 +0000
commit097e3f89b630b7a28f27c96f5e9a036df3ed7710 (patch)
treeb34602a5fcd9cc9474737379ddafde3976c0cb96 /plugins/TwitterBridge/twitteroauthclient.php
parent6c1321b108206d05b75703da22ea8abab82071bf (diff)
parent08422dfa17a5c52d51f21087be0f1d8d602ed0af (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'plugins/TwitterBridge/twitteroauthclient.php')
-rw-r--r--plugins/TwitterBridge/twitteroauthclient.php21
1 files changed, 18 insertions, 3 deletions
diff --git a/plugins/TwitterBridge/twitteroauthclient.php b/plugins/TwitterBridge/twitteroauthclient.php
index ba45b533d..93f6aadd1 100644
--- a/plugins/TwitterBridge/twitteroauthclient.php
+++ b/plugins/TwitterBridge/twitteroauthclient.php
@@ -22,7 +22,7 @@
* @category Integration
* @package StatusNet
* @author Zach Copley <zach@status.net>
- * @copyright 2009 StatusNet, Inc.
+ * @copyright 2009-2010 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
@@ -61,8 +61,23 @@ class TwitterOAuthClient extends OAuthClient
$consumer_key = common_config('twitter', 'consumer_key');
$consumer_secret = common_config('twitter', 'consumer_secret');
- parent::__construct($consumer_key, $consumer_secret,
- $oauth_token, $oauth_token_secret);
+ if (empty($consumer_key) && empty($consumer_secret)) {
+ $consumer_key = common_config(
+ 'twitter',
+ 'global_consumer_key'
+ );
+ $consumer_secret = common_config(
+ 'twitter',
+ 'global_consumer_secret'
+ );
+ }
+
+ parent::__construct(
+ $consumer_key,
+ $consumer_secret,
+ $oauth_token,
+ $oauth_token_secret
+ );
}
// XXX: the following two functions are to support the horrible hack