Issues (525)

admin/header.php (5 issues)

Labels
Severity
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
 * wgSitenotice module for xoops
13
 *
14
 * @copyright       XOOPS Project (https://xoops.org)
15
 * @license         GPL 2.0 or later
16
 * @package         wgsitenotice
17
 * @since           1.0
18
 * @min_xoops       2.5.11
19
 * @author          Goffy (xoops.wedega.com) - Email:<[email protected]> - Website:<https://xoops.wedega.com>
20
 */
21
22
use XoopsModules\Wgsitenotice\Helper;
23
24
require \dirname(__DIR__) . '/preloads/autoloader.php';
25
26
require_once \dirname(__DIR__, 3). '/include/cp_header.php';
27
$thisPath = \dirname(__DIR__);
28
include_once $thisPath.'/include/common.php';
29
$sysPathIcon16 = '../' . $xoopsModule->getInfo('sysicons16');
30
$sysPathIcon32 = '../' . $xoopsModule->getInfo('sysicons32');
31
$pathModuleAdmin = $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin');
32
//
33
$modPathIcon16 = $xoopsModule->getInfo('modicons16');
34
$modPathIcon32 = $xoopsModule->getInfo('modicons32');
35
// Get instance of module
36
$helper = Helper::getInstance();
37
// versions
38
$versionsHandler = $helper->getHandler('Versions');
39
// contents
40
$contentsHandler = $helper->getHandler('Contents');
41
// checkonline
42
$checkonlineHandler = $helper->getHandler('Checkonline');
43
//
44
$myts = MyTextSanitizer::getInstance();
0 ignored issues
show
The type MyTextSanitizer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
45
if (!isset($xoopsTpl) || !\is_object($xoopsTpl)) {
46
    include_once \XOOPS_ROOT_PATH . '/class/template.php';
0 ignored issues
show
The constant XOOPS_ROOT_PATH was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
47
    $xoopsTpl = new \XoopsTpl();
0 ignored issues
show
The type XoopsTpl was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
48
}
49
// System icons path
50
$xoopsTpl->assign('sysPathIcon16', $sysPathIcon16);
51
$xoopsTpl->assign('sysPathIcon32', $sysPathIcon32);
52
// Local icons path
53
$xoopsTpl->assign('modPathIcon16', $modPathIcon16);
54
$xoopsTpl->assign('modPathIcon32', $modPathIcon32);
55
56
//Load languages
57
$helper->loadLanguage('admin');
58
$helper->loadLanguage('modinfo');
59
$helper->loadLanguage('common');
60
// Local admin menu class
61
include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
62
63
xoops_cp_header();
0 ignored issues
show
The function xoops_cp_header was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

63
/** @scrutinizer ignore-call */ 
64
xoops_cp_header();
Loading history...
64
$adminMenu = new ModuleAdmin();
0 ignored issues
show
The type ModuleAdmin was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
65
66
//load stylesheets and jquery for sortable
67
$GLOBALS['xoTheme']->addStylesheet(\WGSITENOTICE_URL . '/assets/css/admin/style.css');
68
$GLOBALS['xoTheme']->addScript(\WGSITENOTICE_URL . '/assets/js/jquery.js');
69
$GLOBALS['xoTheme']->addScript(\WGSITENOTICE_URL . '/assets/js/jquery-ui.js');
70