aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/deprecated-1.8.php2
-rw-r--r--mod/garbagecollector/start.php4
-rw-r--r--mod/groups/actions/edit.php2
-rw-r--r--mod/groups/views/default/forms/groups/edit.php2
-rw-r--r--mod/logrotate/start.php4
-rw-r--r--mod/sitepages/start.php2
-rw-r--r--mod/twitterservice/start.php8
-rw-r--r--mod/twitterservice/twitterservice_lib.php30
-rw-r--r--mod/twitterservice/views/default/twitterservice/metatags.php2
-rw-r--r--views/default/core/settings/tools/plugin.php2
10 files changed, 28 insertions, 30 deletions
diff --git a/engine/lib/deprecated-1.8.php b/engine/lib/deprecated-1.8.php
index ee3265a12..6a03ffb9d 100644
--- a/engine/lib/deprecated-1.8.php
+++ b/engine/lib/deprecated-1.8.php
@@ -3023,7 +3023,6 @@ function get_plugin_usersetting($name, $user_guid = 0, $plugin_id = "") {
return elgg_get_plugin_user_setting($name, $user_guid, $plugin_id);
}
-
/**
* Set a setting for a plugin.
*
@@ -3070,7 +3069,6 @@ function clear_plugin_setting($name, $plugin_id = "") {
return elgg_unset_plugin_setting($name, $plugin_id);
}
-
/**
* Unsets all plugin settings for a plugin.
*
diff --git a/mod/garbagecollector/start.php b/mod/garbagecollector/start.php
index 9579dc29e..c7bd20053 100644
--- a/mod/garbagecollector/start.php
+++ b/mod/garbagecollector/start.php
@@ -8,7 +8,7 @@
elgg_register_event_handler('init', 'system', 'garbagecollector_init');
function garbagecollector_init() {
- $period = get_plugin_setting('period', 'garbagecollector');
+ $period = elgg_get_plugin_setting('period', 'garbagecollector');
switch ($period) {
case 'weekly':
case 'monthly':
@@ -42,7 +42,7 @@ function garbagecollector_cron($hook, $entity_type, $returnvalue, $params) {
// Now, because we are nice, trigger a plugin hook to let other plugins do some GC
$rv = true;
- $period = get_plugin_setting('period','garbagecollector');
+ $period = elgg_get_plugin_setting('period','garbagecollector');
elgg_trigger_plugin_hook('gc', 'system', array('period' => $period));
// Now we optimize all tables
diff --git a/mod/groups/actions/edit.php b/mod/groups/actions/edit.php
index e10739244..baa1a7065 100644
--- a/mod/groups/actions/edit.php
+++ b/mod/groups/actions/edit.php
@@ -72,7 +72,7 @@ switch (get_input('membership')) {
}
// Set access - all groups are public from elgg's point of view, unless the override is in place
-if (get_plugin_setting('hidden_groups', 'groups') == 'yes') {
+if (elgg_get_plugin_setting('hidden_groups', 'groups') == 'yes') {
$visibility = (int)get_input('vis','',false);
$group->access_id = $visibility;
diff --git a/mod/groups/views/default/forms/groups/edit.php b/mod/groups/views/default/forms/groups/edit.php
index 7d24a3c00..8c472d281 100644
--- a/mod/groups/views/default/forms/groups/edit.php
+++ b/mod/groups/views/default/forms/groups/edit.php
@@ -63,7 +63,7 @@ if ($group_profile_fields > 0) {
<?php
-if (get_plugin_setting('hidden_groups', 'groups') == 'yes') {
+if (elgg_get_plugin_setting('hidden_groups', 'groups') == 'yes') {
$this_owner = $vars['entity']->owner_guid;
if (!$this_owner) {
$this_owner = elgg_get_logged_in_user_guid();
diff --git a/mod/logrotate/start.php b/mod/logrotate/start.php
index 28c1694eb..25c01d45b 100644
--- a/mod/logrotate/start.php
+++ b/mod/logrotate/start.php
@@ -8,7 +8,7 @@
elgg_register_event_handler('init', 'system', 'logrotate_init');
function logrotate_init() {
- $period = get_plugin_setting('period', 'logrotate');
+ $period = elgg_get_plugin_setting('period', 'logrotate');
switch ($period) {
case 'weekly':
case 'monthly' :
@@ -31,7 +31,7 @@ function logrotate_cron($hook, $entity_type, $returnvalue, $params) {
$day = 86400;
$offset = 0;
- $period = get_plugin_setting('period', 'logrotate');
+ $period = elgg_get_plugin_setting('period', 'logrotate');
switch ($period) {
case 'weekly':
$offset = $day * 7;
diff --git a/mod/sitepages/start.php b/mod/sitepages/start.php
index 4a2b15dcd..93b6c196e 100644
--- a/mod/sitepages/start.php
+++ b/mod/sitepages/start.php
@@ -40,7 +40,7 @@ function sitepages_init() {
elgg_extend_view('html_head/extend', 'sitepages/metatags');
// Replace the default index page if user has requested and the site is not running walled garden
- if (get_plugin_setting('ownfrontpage', 'sitepages') == 'yes') {
+ if (elgg_get_plugin_setting('ownfrontpage', 'sitepages') == 'yes') {
elgg_register_plugin_hook_handler('index', 'system', 'sitepages_custom_index');
}
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">
diff --git a/views/default/core/settings/tools/plugin.php b/views/default/core/settings/tools/plugin.php
index 89e08bb64..88d366a8a 100644
--- a/views/default/core/settings/tools/plugin.php
+++ b/views/default/core/settings/tools/plugin.php
@@ -28,7 +28,7 @@ if (elgg_view("usersettings/$plugin_id/edit")) {
<div id="<?php echo $plugin_id; ?>_settings">
<?php echo elgg_view("object/plugin", array(
'plugin' => $plugin,
- 'entity' => find_plugin_usersettings($plugin_id, $user_guid),
+ 'entity' => elgg_get_all_plugin_user_settings($plugin_id, $user_guid),
'type' => 'user'
));
?>