Passed
Pull Request — master (#19)
by Michael
02:30
created

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
/**
4
 * Module: XoopsTube
5
 *
6
 * You may not change or alter any portion of this comment or credits
7
 * of supporting developers from this source code or any supporting source code
8
 * which is considered copyrighted (c) material of the original comment or credit authors.
9
 *
10
 * PHP version 5
11
 *
12
 * @category        Module
13
 * @package         Xoopstube
14
 * @author          XOOPS Development Team
15
 * @copyright       2001-2016 XOOPS Project (http://xoops.org)
16
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
17
 * @link            http://xoops.org/
18
 * @since           1.0.6
19
 */
20
use Xmf\Request;
21
22
include __DIR__ . '/../../mainfile.php';
23
24
$moduleDirName = basename(__DIR__);
25
$modulePath    = __DIR__;
26
27
require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/config.php';
28
require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/class/utility.php';
29
require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/video.php';
30
require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/sbookmarks.php';
31
require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/class/class_thumbnail.php';
32
require_once XOOPS_ROOT_PATH . '/modules/xoopstube/class/xoopstubetree.php';
33
require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
34
35
xoops_loadLanguage('main', $moduleDirName);
36
37
require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/class/myts_extended.php';
38
$xtubemyts = new XtubeTextSanitizer(); // MyTextSanitizer object
39
40
global $xoopModuleConfig;
0 ignored issues
show
Compatibility Best Practice introduced by
Use of global functionality is not recommended; it makes your code harder to test, and less reusable.

Instead of relying on global state, we recommend one of these alternatives:

1. Pass all data via parameters

function myFunction($a, $b) {
    // Do something
}

2. Create a class that maintains your state

class MyClass {
    private $a;
    private $b;

    public function __construct($a, $b) {
        $this->a = $a;
        $this->b = $b;
    }

    public function myFunction() {
        // Do something
    }
}
Loading history...
41