-
Notifications
You must be signed in to change notification settings - Fork 7
/
admin.php
54 lines (46 loc) · 1.36 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
<?php
if(!defined('DOKU_PLUGIN_ICONS')) define('DOKU_PLUGIN_ICONS',DOKU_BASE.'lib/plugins/confmanager/icons/');
require_once DOKU_PLUGIN . 'confmanager/adminActions/ConfigManagerAdminAction.php';
require_once DOKU_PLUGIN . 'confmanager/adminActions/ConfigManagerAdminOverview.php';
require_once DOKU_PLUGIN . 'confmanager/adminActions/ConfigManagerAdminShowConfig.php';
/**
* Class admin_plugin_confmanager
*/
class admin_plugin_confmanager extends DokuWiki_Admin_Plugin {
/**
* @var ConfigManagerAdminAction action to run
*/
private $adminAction;
/**
* Determine position in list in admin window
* Lower values are sorted up
*
* @return int
*/
public function getMenuSort() {
return 101;
}
/**
* Carry out required processing
*/
public function handle() {
$this->determineAction();
$this->adminAction->handle();
}
private function determineAction() {
global $INPUT;
if (!$INPUT->has('configFile')) {
$this->adminAction = new ConfigManagerAdminOverview();
return;
}
$this->adminAction = new ConfigManagerAdminShowConfig();
}
/**
* Output html of the admin page
*/
public function html() {
echo '<div id="confmanager">';
$this->adminAction->html();
echo '</div>';
}
}