|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace XoopsModules\Wgsitenotice; |
|
4
|
|
|
|
|
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
|
|
|
This program is distributed in the hope that it will be useful, |
|
11
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
13
|
|
|
*/ |
|
14
|
|
|
/** |
|
15
|
|
|
* wgSitenotice module for xoops |
|
16
|
|
|
* |
|
17
|
|
|
* @copyright XOOPS Project (https://xoops.org) |
|
18
|
|
|
* @license GPL 2.0 or later |
|
19
|
|
|
* @package wgsitenotice |
|
20
|
|
|
* @since 1.0 |
|
21
|
|
|
* @min_xoops 2.5.11 |
|
22
|
|
|
* @author Goffy (xoops.wedega.com) - Email:<[email protected]> - Website:<https://xoops.wedega.com> |
|
23
|
|
|
*/ |
|
24
|
|
|
|
|
25
|
|
|
use XoopsModules\Wgsitenotice\Helper; |
|
26
|
|
|
|
|
27
|
|
|
\defined('XOOPS_ROOT_PATH') || exit('Restricted access'); |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* Class Object Checkonline |
|
31
|
|
|
*/ |
|
32
|
|
|
class Checkonline extends \XoopsObject |
|
|
|
|
|
|
33
|
|
|
{ |
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* Constructor |
|
37
|
|
|
* |
|
38
|
|
|
* @param null |
|
39
|
|
|
*/ |
|
40
|
|
|
public function __construct() |
|
41
|
|
|
{ |
|
42
|
|
|
$this->initVar('oc_server', \XOBJ_DTYPE_TXTBOX); |
|
|
|
|
|
|
43
|
|
|
} |
|
44
|
|
|
|
|
45
|
|
|
/** |
|
46
|
|
|
* @static function &getInstance |
|
47
|
|
|
* @param null |
|
48
|
|
|
* @return Checkonline |
|
49
|
|
|
*/ |
|
50
|
|
|
public static function getInstance() |
|
51
|
|
|
{ |
|
52
|
|
|
static $instance; |
|
53
|
|
|
if (null === $instance) { |
|
54
|
|
|
$instance = new static(); |
|
55
|
|
|
} |
|
56
|
|
|
return $instance; |
|
57
|
|
|
} |
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* Get form |
|
61
|
|
|
* |
|
62
|
|
|
* @param mixed $action |
|
63
|
|
|
* @return \XoopsThemeForm |
|
64
|
|
|
*/ |
|
65
|
|
|
public function getForm($action = false) |
|
66
|
|
|
{ |
|
67
|
|
|
$helper = Helper::getInstance(); |
|
68
|
|
|
if (false === $action) { |
|
69
|
|
|
$action = $_SERVER['REQUEST_URI']; |
|
70
|
|
|
} |
|
71
|
|
|
// Title |
|
72
|
|
|
$title = \sprintf(\_AM_WGSITENOTICE_OC_FORM); |
|
73
|
|
|
// Get Theme Form |
|
74
|
|
|
\xoops_load('XoopsFormLoader'); |
|
|
|
|
|
|
75
|
|
|
$form = new \XoopsThemeForm($title, 'form', $action, 'post', true); |
|
|
|
|
|
|
76
|
|
|
$form->setExtra('enctype="multipart/form-data"'); |
|
77
|
|
|
$oc_server = $helper->getConfig('wgsitenotice_oc_server').'checkonline.php'; |
|
78
|
|
|
// Form Text oc_server |
|
79
|
|
|
$form->addElement( new \XoopsFormText(\_MI_WGSITENOTICE_OC_SERVER, 'oc_server', 50, 255, $oc_server), true ); |
|
|
|
|
|
|
80
|
|
|
// Send |
|
81
|
|
|
$form->addElement(new \XoopsFormHidden('op', 'checkonline')); |
|
|
|
|
|
|
82
|
|
|
$form->addElement(new \XoopsFormButton('', 'submit', \_AM_WGSITENOTICE_OC_START, 'submit')); |
|
|
|
|
|
|
83
|
|
|
return $form; |
|
84
|
|
|
} |
|
85
|
|
|
} |
|
86
|
|
|
|
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths