1
|
|
|
<?php |
2
|
|
|
/* |
3
|
|
|
* You may not change or alter any portion of this comment or credits |
4
|
|
|
* of supporting developers from this source code or any supporting source code |
5
|
|
|
* which is considered copyrighted (c) material of the original comment or credit authors. |
6
|
|
|
* |
7
|
|
|
* This program is distributed in the hope that it will be useful, |
8
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
9
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* @copyright XOOPS Project http://xoops.org/ |
14
|
|
|
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) |
15
|
|
|
* @package |
16
|
|
|
* @since |
17
|
|
|
* @author XOOPS Development Team |
18
|
|
|
*/ |
19
|
|
|
|
20
|
|
|
//defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
|
|
|
|
21
|
|
|
|
22
|
|
|
//$path = dirname(dirname(dirname(__DIR__))); |
|
|
|
|
23
|
|
|
//include_once $path . '/mainfile.php'; |
24
|
|
|
|
25
|
|
|
$moduleDirName = basename(dirname(__DIR__)); |
26
|
|
|
|
27
|
|
|
$moduleHandler = xoops_getHandler('module'); |
28
|
|
|
$module = $moduleHandler->getByDirname($moduleDirName); |
29
|
|
|
$pathIcon32 = '../../' . $module->getInfo('sysicons32'); |
30
|
|
|
$pathModIcon32 = './' . $module->getInfo('modicons32'); |
31
|
|
|
xoops_loadLanguage('modinfo', $module->dirname()); |
32
|
|
|
|
33
|
|
|
$xoopsModuleAdminPath = XOOPS_ROOT_PATH . '/' . $module->getInfo('dirmoduleadmin'); |
34
|
|
|
include_once $xoopsModuleAdminPath . '/language/english/main.php'; |
35
|
|
|
|
36
|
|
|
$adminmenu[] = array( |
37
|
|
|
'title' => _AM_MODULEADMIN_HOME, |
38
|
|
|
'link' => 'admin/index.php', |
39
|
|
|
'icon' => $pathIcon32 . '/home.png' |
40
|
|
|
); |
41
|
|
|
|
42
|
|
|
$adminmenu[] = array( |
43
|
|
|
'title' => _MI_ADMINER_MENU_01, |
44
|
|
|
'link' => 'admin/mysql.php', |
45
|
|
|
'icon' => $pathIcon32 . '/database_go.png' |
46
|
|
|
); |
47
|
|
|
|
48
|
|
|
$adminmenu[] = array( |
49
|
|
|
'title' => _MI_ADMINER_MENU_02, |
50
|
|
|
'link' => 'admin/editor.php', |
51
|
|
|
'icon' => $pathIcon32 . '/translations.png' |
52
|
|
|
); |
53
|
|
|
|
54
|
|
|
$adminmenu[] = array( |
55
|
|
|
'title' => _MI_ADMINER_MENU_03, |
56
|
|
|
'link' => 'admin/dump.php', |
57
|
|
|
'icon' => $pathIcon32 . '/upload.png' |
58
|
|
|
); |
59
|
|
|
|
60
|
|
|
$adminmenu[] = array( |
61
|
|
|
'title' => _AM_MODULEADMIN_ABOUT, |
62
|
|
|
'link' => 'admin/about.php', |
63
|
|
|
'icon' => $pathIcon32 . '/about.png' |
64
|
|
|
); |
65
|
|
|
|
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.