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

include/onupdate.inc.php (1 issue)

Labels
Severity
1
<?php
2
/**
3
 * Module: XoopsTube
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
 *
9
 * PHP version 5
10
 *
11
 * @category        Module
12
 * @package         Xoopstube
13
 * @author          XOOPS Development Team
14
 * @copyright       2001-2016 XOOPS Project (https://xoops.org)
15
 * @license         GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
16
 * @link            https://xoops.org/
17
 * @since           1.0.6
18
 */
19
20
// referer check
21
$ref = xoops_getenv('HTTP_REFERER');
22
if ('' === $ref || str_starts_with($ref, XOOPS_URL . '/modules/system/admin.php')) {
0 ignored issues
show
The function str_starts_with 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

22
if ('' === $ref || /** @scrutinizer ignore-call */ str_starts_with($ref, XOOPS_URL . '/modules/system/admin.php')) {
Loading history...
23
    /* module specific part */
24
25
    /* General part */
26
27
    // Keep the values of block's options when module is updated (by nobunobu)
28
    require_once __DIR__ . '/updateblock.inc.php';
29
}
30