1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace XoopsModules\Countdown; |
6
|
|
|
|
7
|
|
|
/* |
8
|
|
|
You may not change or alter any portion of this comment or credits |
9
|
|
|
of supporting developers from this source code or any supporting source code |
10
|
|
|
which is considered copyrighted (c) material of the original comment or credit authors. |
11
|
|
|
|
12
|
|
|
This program is distributed in the hope that it will be useful, |
13
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
14
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
15
|
|
|
*/ |
16
|
|
|
|
17
|
|
|
/** |
18
|
|
|
* Module: Countdown |
19
|
|
|
* |
20
|
|
|
* @category Module |
21
|
|
|
* @package countdown |
22
|
|
|
* @author XOOPS Development Team <https://xoops.org> |
23
|
|
|
* @copyright {@link https://xoops.org/ XOOPS Project} |
24
|
|
|
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html) |
25
|
|
|
* @link https://xoops.org/ |
26
|
|
|
* @since 1.0.0 |
27
|
|
|
*/ |
28
|
|
|
|
29
|
|
|
use XoopsModules\Countdown; |
30
|
|
|
use XoopsModules\Countdown\Form; |
31
|
|
|
|
32
|
|
|
$moduleDirName = basename(dirname(__DIR__)); |
33
|
|
|
|
34
|
|
|
//$permHelper = new \Xmf\Module\Helper\Permission(); |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* Class Events |
38
|
|
|
*/ |
39
|
|
|
class Events extends \XoopsObject |
40
|
|
|
{ |
41
|
|
|
/** |
42
|
|
|
* Constructor |
43
|
|
|
* |
44
|
|
|
* @param null |
45
|
|
|
*/ |
46
|
|
|
public function __construct() |
47
|
|
|
{ |
48
|
|
|
parent::__construct(); |
49
|
|
|
$this->initVar('event_id', XOBJ_DTYPE_INT); |
50
|
|
|
$this->initVar('event_uid', XOBJ_DTYPE_INT); |
51
|
|
|
$this->initVar('event_name', XOBJ_DTYPE_TXTBOX); |
52
|
|
|
$this->initVar('event_description', XOBJ_DTYPE_OTHER); |
53
|
|
|
$this->initVar('event_date', XOBJ_DTYPE_TIMESTAMP); |
54
|
|
|
$this->initVar('event_categoryid', \XOBJ_DTYPE_INT, null, true); |
55
|
|
|
$this->initVar('event_logo', XOBJ_DTYPE_TXTBOX); |
56
|
|
|
$this->initVar('date_created', \XOBJ_DTYPE_INT, 0, false); |
57
|
|
|
$this->initVar('date_updated', \XOBJ_DTYPE_INT, 0, false); |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* Get form |
62
|
|
|
* |
63
|
|
|
* @param null |
64
|
|
|
* @return EventsForm |
|
|
|
|
65
|
|
|
*/ |
66
|
|
|
public function getForm() |
67
|
|
|
{ |
68
|
|
|
$form = new Form\EventsForm($this); |
69
|
|
|
return $form; |
|
|
|
|
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* @return array|null |
74
|
|
|
*/ |
75
|
|
|
public function getGroupsRead() |
76
|
|
|
{ |
77
|
|
|
$permHelper = new \Xmf\Module\Helper\Permission(); |
78
|
|
|
//return $this->publisher->getHandler('permission')->getGrantedGroupsById('events_read', id); |
79
|
|
|
return $permHelper->getGroupsForItem('sbcolumns_read', $this->getVar('event_id')); |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @return array|null |
84
|
|
|
*/ |
85
|
|
|
public function getGroupsSubmit() |
86
|
|
|
{ |
87
|
|
|
$permHelper = new \Xmf\Module\Helper\Permission(); |
88
|
|
|
// return $this->publisher->getHandler('permission')->getGrantedGroupsById('events_submit', id); |
89
|
|
|
return $permHelper->getGroupsForItem('sbcolumns_submit', $this->getVar('event_id')); |
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* @return array|null |
94
|
|
|
*/ |
95
|
|
|
public function getGroupsModeration() |
96
|
|
|
{ |
97
|
|
|
$permHelper = new \Xmf\Module\Helper\Permission(); |
98
|
|
|
// return $this->publisher->getHandler('permission')->getGrantedGroupsById('events_moderation', id); |
99
|
|
|
return $permHelper->getGroupsForItem('sbcolumns_moderation', $this->getVar('event_id')); |
100
|
|
|
} |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
|
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