Completed
Push — master ( 98eeb4...22887c )
by Michael
11s
created

admin/admin_header.php (1 issue)

Labels

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
 * xLanguage module (eXtensible Language Management For XOOPS)
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      {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
14
 * @package      xlanguage
15
 * @since        2.0
16
 * @author       XOOPS Development Team
17
 **/
18
19
require_once __DIR__ . '/../../../include/cp_header.php';
20
//require_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php');
21
22
require_once __DIR__ . '/../class/utility.php';
23
//require_once __DIR__ . '/../include/common.php';
24
25
$moduleDirName = basename(dirname(__DIR__));
26
27
if (false !== ($moduleHelper = Xmf\Module\Helper::getHelper($moduleDirName))) {
28
} else {
29
    $moduleHelper = Xmf\Module\Helper::getHelper('system');
30
}
31
$adminObject = \Xmf\Module\Admin::getInstance();
32
33
$pathIcon16    = \Xmf\Module\Admin::iconUrl('', 16);
34
$pathIcon32    = \Xmf\Module\Admin::iconUrl('', 32);
35
$pathModIcon32 = $moduleHelper->getModule()->getInfo('modicons32');
36
37
// Load language files
38
$moduleHelper->loadLanguage('admin');
39
$moduleHelper->loadLanguage('modinfo');
40
$moduleHelper->loadLanguage('main');
41
42
$myts = MyTextSanitizer::getInstance();
43
44
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 dependencies

PHP Analyzer uses your composer.json file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects the composer.json to be in the root folder of your repository.

Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the require or require-dev section?

2. Missing use statement

PHP does not complain about undefined classes in ìnstanceof checks. For example, the following PHP code will work perfectly fine:

if ($x instanceof DoesNotExist) {
    // Do something.
}

If you have not tested against this specific condition, such errors might go unnoticed.

Loading history...
45
    require_once $GLOBALS['xoops']->path('class/template.php');
46
    $xoopsTpl = new XoopsTpl();
47
}
48