summaryrefslogtreecommitdiff
path: root/lib/plugins/plugin/classes/ap_delete.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plugins/plugin/classes/ap_delete.class.php')
-rw-r--r--lib/plugins/plugin/classes/ap_delete.class.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/plugins/plugin/classes/ap_delete.class.php b/lib/plugins/plugin/classes/ap_delete.class.php
new file mode 100644
index 000000000..231147479
--- /dev/null
+++ b/lib/plugins/plugin/classes/ap_delete.class.php
@@ -0,0 +1,28 @@
+<?php
+class ap_delete extends ap_manage {
+
+ function process() {
+
+ if (!$this->dir_delete(DOKU_PLUGIN.plugin_directory($this->manager->plugin))) {
+ $this->manager->error = sprintf($this->lang['error_delete'],$this->manager->plugin);
+ } else {
+ msg("Plugin {$this->manager->plugin} successfully deleted.");
+ $this->refresh();
+ }
+ }
+
+ function html() {
+ parent::html();
+
+ ptln('<div class="pm_info">');
+ ptln('<h2>'.$this->lang['deleting'].'</h2>');
+
+ if ($this->manager->error) {
+ ptln('<div class="error">'.str_replace("\n","<br />",$this->manager->error).'</div>');
+ } else {
+ ptln('<p>'.sprintf($this->lang['deleted'],$this->plugin).'</p>');
+ }
+ ptln('</div>');
+ }
+}
+