File: ap_delete.class.php

package info (click to toggle)
dokuwiki 0.0.20091225c-10%2Bsqueeze2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 19,292 kB
  • ctags: 11,043
  • sloc: php: 93,871; sh: 385; perl: 193; makefile: 27
file content (28 lines) | stat: -rw-r--r-- 807 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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>');
    }
}