-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathadmin.php
55 lines (45 loc) · 1.1 KB
/
admin.php
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
// must be run within Dokuwiki
if (!defined('DOKU_INC')) {
die();
}
class admin_plugin_tagging extends DokuWiki_Admin_Plugin {
/** @var helper_plugin_tagging */
private $hlp;
public function __construct() {
$this->hlp = plugin_load('helper', 'tagging');
}
/**
* We allow use by managers
*
* @return bool always false
*/
function forAdminOnly() {
return false;
}
/**
* Handle tag actions
*/
function handle() {
if (!empty($_REQUEST['cmd']['clean'])) {
checkSecurityToken() && $this->hlp->deleteInvalidTaggings();
}
if (!$this->hlp->getParams()) {
$this->hlp->setDefaultSort();
return false;
}
$this->hlp->setDefaultSort();
if (!checkSecurityToken()) {
return false;
}
}
/**
* Draw the interface
*/
public function html() {
echo $this->locale_xhtml('intro');
echo $this->hlp->html_table();
echo $this->locale_xhtml('clean');
echo $this->hlp->html_clean();
}
}