1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
You may not change or alter any portion of this comment or credits |
5
|
|
|
of supporting developers from this source code or any supporting source code |
6
|
|
|
which is considered copyrighted (c) material of the original comment or credit authors. |
7
|
|
|
|
8
|
|
|
This program is distributed in the hope that it will be useful, |
9
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
10
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
11
|
|
|
*/ |
12
|
|
|
/** |
13
|
|
|
* Module: Equipment |
14
|
|
|
* |
15
|
|
|
* @category Module |
16
|
|
|
* @package equipment |
17
|
|
|
* @author swt02026 (https://github.com/swt02026/) |
18
|
|
|
* @author XOOPS Development Team <http://xoops.org> |
19
|
|
|
* @copyright {@link https://xoops.org/ XOOPS Project} |
20
|
|
|
* @license GPL 2.0 or later |
21
|
|
|
* @link https://xoops.org/ |
22
|
|
|
* @since 1.0.0 |
23
|
|
|
*/ |
24
|
|
|
|
25
|
|
|
$moduleDirName = basename(dirname(__DIR__)); |
26
|
|
|
|
27
|
|
|
if (false !== ($moduleHelper = Xmf\Module\Helper::getHelper($moduleDirName))) { |
|
|
|
|
28
|
|
|
} else { |
29
|
|
|
$moduleHelper = Xmf\Module\Helper::getHelper('system'); |
30
|
|
|
} |
31
|
|
|
$adminObject = \Xmf\Module\Admin::getInstance(); |
32
|
|
|
|
33
|
|
|
$pathIcon32 = \Xmf\Module\Admin::menuIconPath(''); |
34
|
|
|
$pathModIcon32 = $moduleHelper->getModule()->getInfo('modicons32'); |
35
|
|
|
|
36
|
|
|
// Load language files |
37
|
|
|
$moduleHelper->loadLanguage('admin'); |
38
|
|
|
$moduleHelper->loadLanguage('modinfo'); |
39
|
|
|
$moduleHelper->loadLanguage('main'); |
40
|
|
|
|
41
|
|
|
$adminmenu[] = array( |
42
|
|
|
'title' => MI_EQUIPMENT_ADMENU1, |
43
|
|
|
'link' => 'admin/index.php', |
44
|
|
|
'icon' => "{$pathIcon32}/home.png" |
45
|
|
|
); |
46
|
|
|
|
47
|
|
|
$adminmenu[] = array( |
48
|
|
|
'title' => MI_EQUIPMENT_MENU1, |
49
|
|
|
'link' => 'admin/equipment_vue.php', |
50
|
|
|
'desc' => MI_EQUIPMENT_MENU1_DESC, |
51
|
|
|
'icon' => $pathIcon32 . '/delivery.png' |
52
|
|
|
); |
53
|
|
|
$adminmenu[] = array( |
54
|
|
|
'title' => MI_EQUIPMENT_MENU2, |
55
|
|
|
'link' => 'admin/rentals_vue.php', |
56
|
|
|
'desc' => MI_EQUIPMENT_MENU2_DESC, |
57
|
|
|
'icon' => $pathIcon32 . '/index.png' |
58
|
|
|
); |
59
|
|
|
$adminmenu[] = array( |
60
|
|
|
'title' => MI_EQUIPMENT_MENU3, |
61
|
|
|
'link' => 'indexvue.php', |
62
|
|
|
'desc' => MI_EQUIPMENT_MENU3_DESC, |
63
|
|
|
'icon' => $pathIcon32 . '/cart_add.png' |
64
|
|
|
); |
65
|
|
|
|
66
|
|
|
$adminmenu[] = array( |
67
|
|
|
'title' => MI_EQUIPMENT_ADMENU2, |
68
|
|
|
'link' => 'admin/equipment.php', |
69
|
|
|
'icon' => "{$pathIcon32}/delivery.png" |
70
|
|
|
); |
71
|
|
|
|
72
|
|
|
$adminmenu[] = array( |
73
|
|
|
'title' => MI_EQUIPMENT_ADMENU3, |
74
|
|
|
'link' => 'admin/rentals.php', |
75
|
|
|
'icon' => "{$pathIcon32}/cart_add.png" |
76
|
|
|
); |
77
|
|
|
|
78
|
|
|
$adminmenu[] = array( |
79
|
|
|
'title' => MI_EQUIPMENT_ADMENU4, |
80
|
|
|
'link' => 'admin/customer.php', |
81
|
|
|
'icon' => "{$pathIcon32}/user-icon.png" |
82
|
|
|
); |
83
|
|
|
|
84
|
|
|
$adminmenu[] = array( |
85
|
|
|
'title' => MI_EQUIPMENT_ADMENU5, |
86
|
|
|
'link' => 'admin/permissions.php', |
87
|
|
|
'icon' => "{$pathIcon32}/permissions.png" |
88
|
|
|
); |
89
|
|
|
|
90
|
|
|
$adminmenu[] = array( |
91
|
|
|
'title' => MI_EQUIPMENT_ADMENU6, |
92
|
|
|
'link' => 'admin/about.php', |
93
|
|
|
'icon' => "{$pathIcon32}/about.png" |
94
|
|
|
); |
95
|
|
|
|
This check looks for the bodies of
if
statements that have no statements or where all statements have been commented out. This may be the result of changes for debugging or the code may simply be obsolete.These
if
bodies can be removed. If you have an empty if but statements in theelse
branch, consider inverting the condition.could be turned into
This is much more concise to read.