From 891176fa97cff309618a3dc11dbac5c5e30a76e5 Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Sat, 12 Sep 2009 13:16:56 +0000 Subject: [PATCH] plugin addons prefs were not being cleared after uninstall. --- e107_handlers/plugin_class.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php index e95b25002..5e5d9eaa4 100644 --- a/e107_handlers/plugin_class.php +++ b/e107_handlers/plugin_class.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_handlers/plugin_class.php,v $ -| $Revision: 1.80 $ -| $Date: 2009-09-10 15:24:57 $ +| $Revision: 1.81 $ +| $Date: 2009-09-12 13:16:56 $ | $Author: e107coders $ +----------------------------------------------------------------------------+ */ @@ -1513,10 +1513,15 @@ class e107plugin $sql = e107::getDb(); $core = e107::getConfig('core'); - // $query = "SELECT * FROM #plugin WHERE plugin_installflag = 1 AND plugin_addons !='' ORDER BY plugin_path ASC"; - $query = "SELECT * FROM #plugin WHERE plugin_addons !='' ORDER BY plugin_path ASC"; - if ($sql -> db_Select_gen($query)) + foreach($this->plugin_addons as $var) // clear all existing prefs. TODO use a pref function for this. + { + $core->setPref($var.'_list',""); + } + + $query = "SELECT * FROM #plugin WHERE plugin_addons !='' ORDER BY plugin_path ASC"; + + if ($sql -> db_Select_gen($query,TRUE)) { while($row = $sql-> db_Fetch()) {