These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * Module Installer module |
||
4 | * |
||
5 | * You may not change or alter any portion of this comment or credits |
||
6 | * of supporting developers from this source code or any supporting source code |
||
7 | * which is considered copyrighted (c) material of the original comment or credit authors. |
||
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 | * @copyright XOOPS Project (https://xoops.org) |
||
13 | * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License |
||
14 | * @package moduleinstaller |
||
15 | * @since 1.0 |
||
16 | * @author XOOPS Module Team |
||
17 | **/ |
||
18 | $path = dirname(dirname(dirname(__DIR__))); |
||
19 | include_once $path . '/mainfile.php'; |
||
20 | include_once $path . '/include/cp_functions.php'; |
||
21 | require_once $path . '/include/cp_header.php'; |
||
22 | |||
23 | xoops_load('XoopsRequest'); |
||
24 | |||
25 | global $xoopsModule; |
||
0 ignored issues
–
show
|
|||
26 | |||
27 | $moduleDirName = $GLOBALS['xoopsModule']->getVar('dirname'); |
||
28 | |||
29 | // Load language files |
||
30 | xoops_loadLanguage('admin', $moduleDirName); |
||
31 | xoops_loadLanguage('modinfo', $moduleDirName); |
||
32 | xoops_loadLanguage('main', $moduleDirName); |
||
33 | |||
34 | $pathIcon16 = '../' . $xoopsModule->getInfo('icons16'); |
||
35 | $pathIcon32 = '../' . $xoopsModule->getInfo('icons32'); |
||
36 | $pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); |
||
37 | |||
38 | include_once $GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'); |
||
39 |
Instead of relying on
global
state, we recommend one of these alternatives:1. Pass all data via parameters
2. Create a class that maintains your state