From 2c2b3c89f8b69b42220c19a811feb6a7b85e989f Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Wed, 1 Feb 2012 21:49:39 +0100 Subject: Plugin deletion can now be enforced. This will skip the RatatoeskrPlugin::delete() part and will not load the plugin before deletion, so you can delete a plugin if it contained syntax errors without disabling plugins in config.php --- ratatoeskr/backend.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'ratatoeskr/backend.php') diff --git a/ratatoeskr/backend.php b/ratatoeskr/backend.php index 0f010d1..406219e 100644 --- a/ratatoeskr/backend.php +++ b/ratatoeskr/backend.php @@ -1649,19 +1649,22 @@ $backend_subactions = url_action_subactions(array( $ste->vars["pagetitle"] = $translation["menu_pluginlist"]; /* Delete plugins? */ - if(isset($_POST["delete"]) and ($_POST["really_delete"] == "yes") and (!empty($_POST["plugins_multiselect"]))) + if(isset($_POST["delete"]) and (($_POST["really_delete"] == "yes") or ($_POST["really_delete"] == "force")) and (!empty($_POST["plugins_multiselect"]))) { foreach($_POST["plugins_multiselect"] as $pid) { try { $plugin = Plugin::by_id($pid); - if(!isset($plugin_objs[$pid])) + if($_POST["really_delete"] != "force") { - eval($plugin->code); - $plugin_objs[$pid] = new $plugin->classname($pid); + if(!isset($plugin_objs[$pid])) + { + eval($plugin->code); + $plugin_objs[$pid] = new $plugin->classname($pid); + } + $plugin_objs[$pid]->uninstall(); } - $plugin_objs[$pid]->uninstall(); $plugin->delete(); } catch(DoesNotExistError $e) -- cgit v1.2.3-70-g09d2