xref: /plugin/tagging/admin.php (revision 26c4179dc6456019ba915da2c1e15436acbf3f61)
1<?php
2// must be run within Dokuwiki
3if (!defined('DOKU_INC')) {
4    die();
5}
6
7class admin_plugin_tagging extends DokuWiki_Admin_Plugin {
8
9    /** @var helper_plugin_tagging */
10    private $hlp;
11
12    public function __construct() {
13        $this->hlp = plugin_load('helper', 'tagging');
14    }
15
16    /**
17     * We allow use by managers
18     *
19     * @return bool always false
20     */
21    function forAdminOnly() {
22        return false;
23    }
24
25    /**
26     * Handle tag actions
27     */
28    function handle() {
29        if (!$this->hlp->getParams()) {
30            $this->hlp->setDefaultSort();
31            return false;
32        }
33
34        $this->hlp->setDefaultSort();
35
36        if (!checkSecurityToken()) {
37            return false;
38        }
39    }
40
41    /**
42     * Draw the interface
43     */
44    public function html() {
45        echo $this->locale_xhtml('intro');
46        echo $this->hlp->html_table();
47    }
48}
49