XoopsModules25x /
xoopspartners
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | /* |
||
| 3 | * XoopsPartners 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 | /** |
||
| 13 | * Module: XoopsPartners - a partner affiliation links module |
||
| 14 | * |
||
| 15 | * @category Module |
||
| 16 | * @package xoopspartners |
||
| 17 | * @subpackage admin |
||
| 18 | * @author XOOPS Module Development Team |
||
| 19 | * @copyright {@link http://xoops.org 2001-2016 XOOPS Project} |
||
| 20 | * @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License} |
||
| 21 | * @link http://xoops.org XOOPS |
||
| 22 | * @since 1.11 |
||
| 23 | */ |
||
| 24 | |||
| 25 | require_once dirname(dirname(dirname(__DIR__))) . '/mainfile.php'; |
||
| 26 | include_once $GLOBALS['xoops']->path('/include/cp_functions.php'); |
||
| 27 | require $GLOBALS['xoops']->path('/include/cp_header.php'); |
||
| 28 | |||
| 29 | $moduleDirname = basename(dirname(__DIR__)); |
||
| 30 | xoops_load('constants', $moduleDirname); |
||
| 31 | |||
| 32 | //Load languages |
||
| 33 | $moduleDirname = $GLOBALS['xoopsModule']->getVar('dirname', 'n'); |
||
| 34 | xoops_loadLanguage('admin', $moduleDirname); |
||
| 35 | xoops_loadLanguage('modinfo', $moduleDirname); |
||
| 36 | xoops_loadLanguage('main', $moduleDirname); |
||
| 37 | |||
| 38 | include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'); |
||
| 39 | |||
| 40 | $moduleHandler = xoops_getHandler('module'); |
||
| 41 | $moduleInfo = $moduleHandler->get($GLOBALS['xoopsModule']->getVar('mid')); |
||
| 42 | $pathIcon16 = $GLOBALS['xoopsModule']->getInfo('icons16'); |
||
| 43 | $pathIcon32 = $GLOBALS['xoopsModule']->getInfo('icons32'); |
||
| 44 | $pathModuleAdmin = $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin'); |
||
| 45 | //$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); |
||
|
0 ignored issues
–
show
|
|||
| 46 | //$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); |
||
| 47 | |||
| 48 | $myts = MyTextSanitizer::getInstance(); |
||
| 49 | |||
| 50 | if (!isset($GLOBALS['xoopsTpl']) || !($GLOBALS['xoopsTpl'] instanceof XoopsTpl)) { |
||
|
0 ignored issues
–
show
The class
XoopsTpl does not exist. Did you forget a USE statement, or did you not list all dependencies?
This error could be the result of: 1. Missing dependenciesPHP Analyzer uses your Are you sure this class is defined by one of your dependencies, or did you maybe
not list a dependency in either the 2. Missing use statementPHP does not complain about undefined classes in if ($x instanceof DoesNotExist) {
// Do something.
}
If you have not tested against this specific condition, such errors might go unnoticed. Loading history...
|
|||
| 51 | include_once $GLOBALS['xoops']->path('/class/template.php'); |
||
| 52 | $GLOBALS['xoopsTpl'] = new XoopsTpl(); |
||
| 53 | } |
||
| 54 | |||
| 55 | xoops_cp_header(); |
||
| 56 |
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.