mambax7 /
planet
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 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 | $path = dirname(dirname(dirname(__DIR__))); |
||
| 21 | include_once $path . '/mainfile.php'; |
||
| 22 | include_once $path . '/include/cp_functions.php'; |
||
| 23 | require_once $path . '/include/cp_header.php'; |
||
| 24 | |||
| 25 | global $xoopsModule; |
||
| 26 | |||
| 27 | $moduleDirName = $GLOBALS['xoopsModule']->getVar('dirname'); |
||
| 28 | |||
| 29 | //if functions.php file exist |
||
| 30 | //require_once dirname(__DIR__) . '/include/functions.php'; |
||
| 31 | |||
| 32 | // Load language files |
||
| 33 | xoops_loadLanguage('admin', $moduleDirName); |
||
| 34 | xoops_loadLanguage('modinfo', $moduleDirName); |
||
| 35 | xoops_loadLanguage('main', $moduleDirName); |
||
| 36 | |||
| 37 | $pathIcon16 = '../' . $xoopsModule->getInfo('icons16'); |
||
| 38 | $pathIcon32 = '../' . $xoopsModule->getInfo('icons32'); |
||
| 39 | $pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); |
||
| 40 | |||
| 41 | include_once $GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'); |
||
| 42 | |||
| 43 | require XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php'; |
||
| 44 | require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/functions.php'; |
||
| 45 | include_once XOOPS_ROOT_PATH . '/Frameworks/art/functions.admin.php'; |
||
| 46 | |||
| 47 | // include the default language file for the admin interface |
||
| 48 | View Code Duplication | if (!@include_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' |
|
|
0 ignored issues
–
show
|
|||
| 49 | . $xoopsConfig['language'] . '/main.php' |
||
| 50 | ) { |
||
| 51 | include_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/main.php'; |
||
| 52 | } |
||
| 53 | |||
| 54 | planet_define_url_delimiter(); |
||
| 55 | $myts = MyTextSanitizer::getInstance(); |
||
| 56 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.