1
|
|
|
<?php
|
2
|
|
|
|
3
|
|
|
declare(strict_types=1);
|
4
|
|
|
|
5
|
|
|
/*
|
6
|
|
|
You may not change or alter any portion of this comment or credits
|
7
|
|
|
of supporting developers from this source code or any supporting source code
|
8
|
|
|
which is considered copyrighted (c) material of the original comment or credit authors.
|
9
|
|
|
|
10
|
|
|
This program is distributed in the hope that it will be useful,
|
11
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
13
|
|
|
*/
|
14
|
|
|
|
15
|
|
|
/**
|
16
|
|
|
* wgFileManager module for xoops
|
17
|
|
|
*
|
18
|
|
|
* @copyright 2021 XOOPS Project (https://xoops.org)
|
19
|
|
|
* @license GPL 2.0 or later
|
20
|
|
|
* @package wgfilemanager
|
21
|
|
|
* @author Goffy - Wedega - Email:[email protected] - Website:https://xoops.wedega.com
|
22
|
|
|
*/
|
23
|
|
|
|
24
|
|
|
$dirname = \basename(\dirname(__DIR__));
|
25
|
|
|
$moduleHandler = \xoops_getHandler('module');
|
26
|
|
|
$xoopsModule = XoopsModule::getByDirname($dirname);
|
27
|
|
|
$moduleInfo = $moduleHandler->get($xoopsModule->getVar('mid'));
|
28
|
|
|
$sysPathIcon32 = $moduleInfo->getInfo('sysicons32');
|
|
|
|
|
29
|
|
|
$helper = \XoopsModules\Wgfilemanager\Helper::getInstance();
|
30
|
|
|
|
31
|
|
|
$adminmenu[] = [
|
32
|
|
|
'title' => \_MI_WGFILEMANAGER_ADMENU1,
|
33
|
|
|
'link' => 'admin/index.php',
|
34
|
|
|
'icon' => 'assets/icons/32/dashboard.png',
|
35
|
|
|
];
|
36
|
|
|
$adminmenu[] = [
|
37
|
|
|
'title' => \_MI_WGFILEMANAGER_ADMENU2,
|
38
|
|
|
'link' => 'admin/directory.php',
|
39
|
|
|
'icon' => 'assets/icons/32/directory.png',
|
40
|
|
|
];
|
41
|
|
|
$adminmenu[] = [
|
42
|
|
|
'title' => \_MI_WGFILEMANAGER_ADMENU3,
|
43
|
|
|
'link' => 'admin/file.php',
|
44
|
|
|
'icon' => 'assets/icons/32/file.png',
|
45
|
|
|
];
|
46
|
|
|
if ((bool)$helper->getConfig('use_broken')) {
|
47
|
|
|
$adminmenu[] = [
|
48
|
|
|
'title' => \_MI_WGFILEMANAGER_ADMENU4,
|
49
|
|
|
'link' => 'admin/broken.php',
|
50
|
|
|
'icon' => 'assets/icons/32/broken.png',
|
51
|
|
|
];
|
52
|
|
|
}
|
53
|
|
|
if ((bool)$helper->getConfig('use_favorites')) {
|
54
|
|
|
$adminmenu[] = [
|
55
|
|
|
'title' => \_MI_WGFILEMANAGER_ADMENU9,
|
56
|
|
|
'link' => 'admin/favorite.php',
|
57
|
|
|
'icon' => 'assets/icons/32/favorite.png',
|
58
|
|
|
];
|
59
|
|
|
}
|
60
|
|
|
$adminmenu[] = [
|
61
|
|
|
'title' => \_MI_WGFILEMANAGER_ADMENU5,
|
62
|
|
|
'link' => 'admin/mimetype.php',
|
63
|
|
|
'icon' => 'assets/icons/32/mimetype.png',
|
64
|
|
|
];
|
65
|
|
|
$adminmenu[] = [
|
66
|
|
|
'title' => \_MI_WGFILEMANAGER_ADMENU6,
|
67
|
|
|
'link' => 'admin/permissions.php',
|
68
|
|
|
'icon' => 'assets/icons/32/permissions.png',
|
69
|
|
|
];
|
70
|
|
|
$adminmenu[] = [
|
71
|
|
|
'title' => \_MI_WGFILEMANAGER_ADMENU7,
|
72
|
|
|
'link' => 'admin/clone.php',
|
73
|
|
|
'icon' => 'assets/icons/32/clone.png',
|
74
|
|
|
];
|
75
|
|
|
$adminmenu[] = [
|
76
|
|
|
'title' => \_MI_WGFILEMANAGER_ADMENU8,
|
77
|
|
|
'link' => 'admin/feedback.php',
|
78
|
|
|
'icon' => 'assets/icons/32/feedback.png',
|
79
|
|
|
];
|
80
|
|
|
$adminmenu[] = [
|
81
|
|
|
'title' => \_MI_WGFILEMANAGER_ABOUT,
|
82
|
|
|
'link' => 'admin/about.php',
|
83
|
|
|
'icon' => 'assets/icons/32/about.png',
|
84
|
|
|
];
|
85
|
|
|
|