aboutsummaryrefslogtreecommitdiff
path: root/mod/twitterservice/twitterservice_lib.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-09 22:04:46 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-09 22:04:46 +0000
commit6b3ee5365b10afc37677781fc5f07539f1d8636f (patch)
treea9280742d01bda2b5b5b9ee7540f1c8a7fc31947 /mod/twitterservice/twitterservice_lib.php
parent6f41511034886224e0888d2f886c7d7ccc48636d (diff)
downloadelgg-6b3ee5365b10afc37677781fc5f07539f1d8636f.tar.gz
elgg-6b3ee5365b10afc37677781fc5f07539f1d8636f.tar.bz2
Refs #2874. Finished removing calls to deprecated plugin mgmt functions in core and core plugins.
git-svn-id: http://code.elgg.org/elgg/trunk@8090 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/twitterservice/twitterservice_lib.php')
-rw-r--r--mod/twitterservice/twitterservice_lib.php30
1 files changed, 15 insertions, 15 deletions
diff --git a/mod/twitterservice/twitterservice_lib.php b/mod/twitterservice/twitterservice_lib.php
index c8b31c526..b302dcf43 100644
--- a/mod/twitterservice/twitterservice_lib.php
+++ b/mod/twitterservice/twitterservice_lib.php
@@ -14,15 +14,15 @@
* @return bool
*/
function twitterservice_allow_sign_on_with_twitter() {
- if (!$consumer_key = get_plugin_setting('consumer_key', 'twitterservice')) {
+ if (!$consumer_key = elgg_get_plugin_setting('consumer_key', 'twitterservice')) {
return FALSE;
}
- if (!$consumer_secret = get_plugin_setting('consumer_secret', 'twitterservice')) {
+ if (!$consumer_secret = elgg_get_plugin_setting('consumer_secret', 'twitterservice')) {
return FALSE;
}
- return get_plugin_setting('sign_on', 'twitterservice') == 'yes';
+ return elgg_get_plugin_setting('sign_on', 'twitterservice') == 'yes';
}
function twitterservice_forward() {
@@ -59,8 +59,8 @@ function twitterservice_login() {
if (!$users = get_entities_from_private_setting_multi($values, 'user', '', 0, '', 0)) {
// need Twitter account credentials
- $consumer_key = get_plugin_setting('consumer_key', 'twitterservice');
- $consumer_secret = get_plugin_setting('consumer_secret', 'twitterservice');
+ $consumer_key = elgg_get_plugin_setting('consumer_key', 'twitterservice');
+ $consumer_secret = elgg_get_plugin_setting('consumer_secret', 'twitterservice');
$api = new TwitterOAuth($consumer_key, $consumer_secret, $token['oauth_token'], $token['oauth_token_secret']);
$twitter = $api->get('account/verify_credentials');
@@ -121,9 +121,9 @@ function twitterservice_login() {
}
// set twitter services tokens
- set_plugin_usersetting('twitter_name', $token['screen_name'], $user->guid);
- set_plugin_usersetting('access_key', $token['oauth_token'], $user->guid);
- set_plugin_usersetting('access_secret', $token['oauth_token_secret'], $user->guid);
+ elgg_set_plugin_user_setting('twitter_name', $token['screen_name'], $user->guid);
+ elgg_set_plugin_user_setting('access_key', $token['oauth_token'], $user->guid);
+ elgg_set_plugin_user_setting('access_secret', $token['oauth_token_secret'], $user->guid);
// pull in Twitter icon
twitterservice_update_user_avatar($user, $twitter->profile_image_url);
@@ -213,9 +213,9 @@ function twitterservice_authorize() {
}
// register user's access tokens
- set_plugin_usersetting('twitter_name', $token['screen_name']);
- set_plugin_usersetting('access_key', $token['oauth_token']);
- set_plugin_usersetting('access_secret', $token['oauth_token_secret']);
+ elgg_set_plugin_user_setting('twitter_name', $token['screen_name']);
+ elgg_set_plugin_user_setting('access_key', $token['oauth_token']);
+ elgg_set_plugin_user_setting('access_secret', $token['oauth_token_secret']);
system_message(elgg_echo('twitterservice:authorize:success'));
forward('pg/settings/plugins');
@@ -234,8 +234,8 @@ function twitterservice_revoke() {
function twitterservice_get_authorize_url($callback=NULL) {
global $SESSION;
- $consumer_key = get_plugin_setting('consumer_key', 'twitterservice');
- $consumer_secret = get_plugin_setting('consumer_secret', 'twitterservice');
+ $consumer_key = elgg_get_plugin_setting('consumer_key', 'twitterservice');
+ $consumer_secret = elgg_get_plugin_setting('consumer_secret', 'twitterservice');
// request tokens from Twitter
$twitter = new TwitterOAuth($consumer_key, $consumer_secret);
@@ -253,8 +253,8 @@ function twitterservice_get_authorize_url($callback=NULL) {
function twitterservice_get_access_token($oauth_verifier=FALSE) {
global $SESSION;
- $consumer_key = get_plugin_setting('consumer_key', 'twitterservice');
- $consumer_secret = get_plugin_setting('consumer_secret', 'twitterservice');
+ $consumer_key = elgg_get_plugin_setting('consumer_key', 'twitterservice');
+ $consumer_secret = elgg_get_plugin_setting('consumer_secret', 'twitterservice');
// retrieve stored tokens
$oauth_token = $SESSION['twitterservice']['oauth_token'];