]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #5671 fixed query for clearing admin settings on plugin
authorcash <cash.costello@gmail.com>
Sat, 6 Jul 2013 01:03:34 +0000 (21:03 -0400)
committercash <cash.costello@gmail.com>
Sat, 6 Jul 2013 01:03:34 +0000 (21:03 -0400)
engine/classes/ElggPlugin.php

index c1c46f272309a68cde88eabe6bcd74f39e399aab..3cc90f623f798e236212d584b59fb075d06ed232 100644 (file)
@@ -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);
        }