Completed
Pull Request — master (#11)
by
unknown
01:56
created

admin/admin_header.php (1 issue)

Upgrade to new PHP Analysis Engine

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
 * @author       XOOPS Development Team
16
 */
17
18
$moduleDirName = basename(dirname(__DIR__));
19
require_once dirname(dirname(dirname(__DIR__))) . '/mainfile.php';
20
include_once $GLOBALS['xoops']->path('include/cp_header.php');
21
xoops_load('xoopsformloader');
22
xoops_load('constants', $moduleDirName);
23
24
$abtHelper = \Xmf\Module\Helper::getHelper($moduleDirName);
25
26
$myts = MyTextSanitizer::getInstance();
27
28
if (!isset($GLOBALS['xoopsTpl']) || !($GLOBALS['xoopsTpl'] instanceof XoopsTpl)) {
29
    include_once $GLOBALS['xoops']->path('class/template.php');
30
    $xoopsTpl = new XoopsTpl();
31
}
32
33
// Load language files
34
$abtHelper->loadLanguage('modinfo');
35
$abtHelper->loadLanguage('main');
36
//xoops_loadLanguage('admin', $moduleDirName);
0 ignored issues
show
Unused Code Comprehensibility introduced by
70% of this comment could be valid code. Did you maybe forget this after debugging?

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.

Loading history...
37
//xoops_loadLanguage('modinfo', $moduleDirName);
38
//xoops_loadLanguage('main', $moduleDirName);
39