aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2013-07-05 21:03:34 -0400
committercash <cash.costello@gmail.com>2013-07-05 21:03:34 -0400
commit217c51eb6bbf754570cc9347a031b72927bcc985 (patch)
tree71417f21da94e9f95e770774d7b613913f072b3a
parentd64cc6180d59768b33fd097bbcc87c91839aab0d (diff)
downloadelgg-217c51eb6bbf754570cc9347a031b72927bcc985.tar.gz
elgg-217c51eb6bbf754570cc9347a031b72927bcc985.tar.bz2
Fixes #5671 fixed query for clearing admin settings on plugin
-rw-r--r--engine/classes/ElggPlugin.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/engine/classes/ElggPlugin.php b/engine/classes/ElggPlugin.php
index c1c46f272..3cc90f623 100644
--- a/engine/classes/ElggPlugin.php
+++ b/engine/classes/ElggPlugin.php
@@ -350,11 +350,14 @@ class ElggPlugin extends ElggObject {
*/
public function unsetAllSettings() {
$db_prefix = get_config('dbprefix');
- $ps_prefix = elgg_namespace_plugin_private_setting('setting', '');
+
+ $us_prefix = elgg_namespace_plugin_private_setting('user_setting', '', $this->getID());
+ $is_prefix = elgg_namespace_plugin_private_setting('internal', '', $this->getID());
$q = "DELETE FROM {$db_prefix}private_settings
WHERE entity_guid = $this->guid
- AND name NOT LIKE '$ps_prefix%'";
+ AND name NOT LIKE '$us_prefix%'
+ AND name NOT LIKE '$is_prefix%'";
return delete_data($q);
}