diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-09 22:04:46 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-09 22:04:46 +0000 |
commit | 6b3ee5365b10afc37677781fc5f07539f1d8636f (patch) | |
tree | a9280742d01bda2b5b5b9ee7540f1c8a7fc31947 /mod/twitterservice | |
parent | 6f41511034886224e0888d2f886c7d7ccc48636d (diff) | |
download | elgg-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')
-rw-r--r-- | mod/twitterservice/start.php | 8 | ||||
-rw-r--r-- | mod/twitterservice/twitterservice_lib.php | 30 | ||||
-rw-r--r-- | mod/twitterservice/views/default/twitterservice/metatags.php | 2 |
3 files changed, 20 insertions, 20 deletions
diff --git a/mod/twitterservice/start.php b/mod/twitterservice/start.php index ba7904ead..b5f4c2d21 100644 --- a/mod/twitterservice/start.php +++ b/mod/twitterservice/start.php @@ -87,8 +87,8 @@ function twitterservice_tweet($hook, $entity_type, $returnvalue, $params) { } // check admin settings - $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'); if (!($consumer_key && $consumer_secret)) { return NULL; } @@ -110,8 +110,8 @@ function twitterservice_tweet($hook, $entity_type, $returnvalue, $params) { function twitterservice_fetch_tweets($user_id, $options=array()) { // check admin settings - $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'); if (!($consumer_key && $consumer_secret)) { return FALSE; } 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']; diff --git a/mod/twitterservice/views/default/twitterservice/metatags.php b/mod/twitterservice/views/default/twitterservice/metatags.php index 1335cd759..0fd0aab0f 100644 --- a/mod/twitterservice/views/default/twitterservice/metatags.php +++ b/mod/twitterservice/views/default/twitterservice/metatags.php @@ -7,7 +7,7 @@ * @copyright Curverider Ltd 2010 */ -if ($api_key = get_plugin_setting('consumer_key', 'twitterservice')) { +if ($api_key = elgg_get_plugin_setting('consumer_key', 'twitterservice')) { $tags = <<<__HTML <script src="http://platform.twitter.com/anywhere.js?id=$api_key&v=1" type="text/javascript"></script> <script type="text/javascript"> |