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 {@link http://xoops.org/ XOOPS Project} |
14
|
|
|
* @license {@link http://www.fsf.org/copyleft/gpl.html GNU public license} |
15
|
|
|
* @package |
16
|
|
|
* @since |
17
|
|
|
* @author XOOPS Development Team |
18
|
|
|
*/ |
19
|
|
|
|
20
|
|
|
require_once __DIR__ . '/../../../include/cp_header.php'; |
21
|
|
|
//require_once __DIR__ . '/../../../class/xoopsformloader.php'; |
22
|
|
|
|
23
|
|
|
//require_once __DIR__ . '/../class/util.php'; |
24
|
|
|
//require_once __DIR__ . '/../include/common.php'; |
25
|
|
|
|
26
|
|
|
if (!isset($moduleDirName)) { |
27
|
|
|
$moduleDirName = basename(dirname(__DIR__)); |
28
|
|
|
} |
29
|
|
|
|
30
|
|
|
if (false !== ($moduleHelper = Xmf\Module\Helper::getHelper($moduleDirName))) { |
31
|
|
|
} else { |
32
|
|
|
$moduleHelper = Xmf\Module\Helper::getHelper('system'); |
33
|
|
|
} |
34
|
|
|
$adminObject = \Xmf\Module\Admin::getInstance(); |
35
|
|
|
|
36
|
|
|
$pathIcon16 = \Xmf\Module\Admin::iconUrl('', 16); |
37
|
|
|
$pathIcon32 = \Xmf\Module\Admin::iconUrl('', 32); |
38
|
|
|
$pathModIcon32 = $moduleHelper->getModule()->getInfo('modicons32'); |
39
|
|
|
|
40
|
|
|
// Load language files |
41
|
|
|
$moduleHelper->loadLanguage('admin'); |
42
|
|
|
$moduleHelper->loadLanguage('modinfo'); |
43
|
|
|
$moduleHelper->loadLanguage('main'); |
44
|
|
|
|
45
|
|
|
$skin_folder = $moduleHelper->getConfig('skin_folder'); |
46
|
|
|
|
47
|
|
|
$myts = MyTextSanitizer::getInstance(); |
48
|
|
|
|
49
|
|
View Code Duplication |
if (!isset($GLOBALS['xoopsTpl']) || !($GLOBALS['xoopsTpl'] instanceof XoopsTpl)) { |
|
|
|
|
50
|
|
|
require_once $GLOBALS['xoops']->path('class/template.php'); |
51
|
|
|
$xoopsTpl = new XoopsTpl(); |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
$GLOBALS['xoopsTpl']->assign('api_key', $moduleHelper->getConfig('apcal_mapsapi')); |
55
|
|
|
//Module specific elements |
56
|
|
|
//require_once $GLOBALS['xoops']->path("modules/{$moduleDirName}/include/functions.php"); |
57
|
|
|
//require_once $GLOBALS['xoops']->path("modules/{$moduleDirName}/include/config.php"); |
58
|
|
|
|
59
|
|
|
//Handlers |
60
|
|
|
//$XXXHandler = xoops_getModuleHandler('XXX', $moduleDirName); |
61
|
|
|
|
62
|
|
|
//xoops_cp_header(); |
63
|
|
|
|
64
|
|
|
|
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 thecomposer.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
orrequire-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 you have not tested against this specific condition, such errors might go unnoticed.