aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2012-02-01 21:49:39 +0100
committerKevin Chabowski <kevin@kch42.de>2012-02-01 21:49:39 +0100
commit2c2b3c89f8b69b42220c19a811feb6a7b85e989f (patch)
tree578738860d8a61188919ece43b2f0805aa30bd9b
parente4e0bf836669b5419a0e2c86409c46898beef5b4 (diff)
downloadratatoeskr-cms-2c2b3c89f8b69b42220c19a811feb6a7b85e989f.tar.gz
ratatoeskr-cms-2c2b3c89f8b69b42220c19a811feb6a7b85e989f.tar.bz2
ratatoeskr-cms-2c2b3c89f8b69b42220c19a811feb6a7b85e989f.zip
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
-rw-r--r--ratatoeskr/backend.php13
-rw-r--r--ratatoeskr/templates/src/systemtemplates/pluginlist.html1
-rw-r--r--ratatoeskr/translations/de.php3
-rw-r--r--ratatoeskr/translations/en.php1
4 files changed, 12 insertions, 6 deletions
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)
diff --git a/ratatoeskr/templates/src/systemtemplates/pluginlist.html b/ratatoeskr/templates/src/systemtemplates/pluginlist.html
index 9c64ed1..e51c769 100644
--- a/ratatoeskr/templates/src/systemtemplates/pluginlist.html
+++ b/ratatoeskr/templates/src/systemtemplates/pluginlist.html
@@ -46,6 +46,7 @@
<select name="really_delete">
<option value="no" selected="selected"><ste:get_translation for="no" /></option>
<option value="yes"><ste:get_translation for="yes" /></option>
+ <option value="force"><ste:get_translation for="enforce" /></option>
</select>
|
<input type="submit" name="update" value="<ste:get_translation for='plugin_update' />" />
diff --git a/ratatoeskr/translations/de.php b/ratatoeskr/translations/de.php
index 5eba112..e75ec05 100644
--- a/ratatoeskr/translations/de.php
+++ b/ratatoeskr/translations/de.php
@@ -216,7 +216,7 @@ $translation = array(
"install_from_package" => "Aus Paket installieren",
"invalid_package" => "Ungültiges Paket",
"incompatible_plugin" => "Dieses Plugin ist nicht mit dieser Version von Ratatöskr kompatibel. Es benötigt die API Version [[API]] oder eine kompatible.",
- "plugin_safety_warning" => "Installiere <strong>niemals</strong> ein Plugin, dem du nicht vertraust! Plugins sind sehr mächtig und könnten potentiell diene Ratatöskr Installation zerstören!",
+ "plugin_safety_warning" => "Installiere <strong>niemals</strong> ein Plugin, dem du nicht vertraust! Plugins sind sehr mächtig und könnten potentiell deine Ratatöskr Installation zerstören!",
"plugin_src" => "Sourcecode",
"license" => "Lizenz",
"plugin_installed_successfully" => "Plugin erfolgreich installiert.",
@@ -258,6 +258,7 @@ $translation = array(
"setup_link_yourpage" => "Deine neuen Webpage",
"setup_link_backend" => "Das Backend deiner Webpage",
"admin_data_must_be_filled_out" => "Administrator Daten müssen ausgefüllt sein",
+ "enforce" => "Erzwingen",
/* Very long texts here */
"linking_back_hint" => <<<LINKINGBACK
<h2>Verlinken auf die Seitenwurzel</h2>
diff --git a/ratatoeskr/translations/en.php b/ratatoeskr/translations/en.php
index ca015d3..05348ee 100644
--- a/ratatoeskr/translations/en.php
+++ b/ratatoeskr/translations/en.php
@@ -258,6 +258,7 @@ $translation = array(
"setup_link_yourpage" => "Your new Webpage",
"setup_link_backend" => "The backend of your Webpage",
"admin_data_must_be_filled_out" => "Administrator data must be filled out",
+ "enforce" => "Enforce",
/* Very long texts here */
"linking_back_hint" => <<<LINKINGBACK
<h2>Linking back</h2>