1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* |
4
|
|
|
* Auto Groups extension for the phpBB Forum Software package. |
5
|
|
|
* |
6
|
|
|
* @copyright (c) 2014 phpBB Limited <https://www.phpbb.com> |
7
|
|
|
* @license GNU General Public License, version 2 (GPL-2.0) |
8
|
|
|
* |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
namespace phpbb\autogroups\notification\type; |
12
|
|
|
|
13
|
|
|
class group_added extends \phpbb\notification\type\base |
|
|
|
|
14
|
|
|
{ |
15
|
|
|
/** |
16
|
|
|
* {@inheritdoc} |
17
|
|
|
*/ |
18
|
|
|
public function get_type() |
19
|
|
|
{ |
20
|
|
|
return 'phpbb.autogroups.notification.type.group_added'; |
21
|
|
|
} |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* {@inheritdoc} |
25
|
|
|
*/ |
26
|
|
|
public function is_available() |
27
|
|
|
{ |
28
|
|
|
return false; |
29
|
|
|
} |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* {@inheritdoc} |
33
|
|
|
*/ |
34
|
|
|
public static function get_item_id($type_data) |
35
|
|
|
{ |
36
|
|
|
return (int) $type_data['group_id']; |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* {@inheritdoc} |
41
|
|
|
*/ |
42
|
|
|
public static function get_item_parent_id($type_data) |
43
|
|
|
{ |
44
|
|
|
return 0; |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* {@inheritdoc} |
49
|
|
|
*/ |
50
|
|
|
public function find_users_for_notification($type_data, $options = array()) |
51
|
|
|
{ |
52
|
|
|
$users = array(); |
53
|
|
|
|
54
|
|
|
$type_data['user_ids'] = (!is_array($type_data['user_ids'])) ? array($type_data['user_ids']) : $type_data['user_ids']; |
55
|
|
|
|
56
|
|
|
foreach ($type_data['user_ids'] as $user_id) |
57
|
|
|
{ |
58
|
|
|
$users[$user_id] = $this->notification_manager->get_default_methods(); |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
return $users; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* {@inheritdoc} |
66
|
|
|
*/ |
67
|
|
|
public function users_to_query() |
68
|
|
|
{ |
69
|
|
|
return array(); |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* {@inheritdoc} |
74
|
|
|
*/ |
75
|
|
|
public function get_title() |
76
|
|
|
{ |
77
|
|
|
return $this->language->lang('AUTOGROUPS_NOTIFICATION_GROUP_ADDED', $this->get_data('group_name')); |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* {@inheritdoc} |
82
|
|
|
*/ |
83
|
|
|
public function get_url() |
84
|
|
|
{ |
85
|
|
|
return append_sid($this->phpbb_root_path . 'memberlist.' . $this->php_ext, "mode=group&g={$this->item_id}"); |
|
|
|
|
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* {@inheritdoc} |
90
|
|
|
*/ |
91
|
|
|
public function get_email_template() |
92
|
|
|
{ |
93
|
|
|
return false; |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* {@inheritdoc} |
98
|
|
|
*/ |
99
|
|
|
public function get_email_template_variables() |
100
|
|
|
{ |
101
|
|
|
return array(); |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* {@inheritdoc} |
106
|
|
|
*/ |
107
|
|
|
public function create_insert_array($type_data, $pre_create_data = array()) |
108
|
|
|
{ |
109
|
|
|
$this->set_data('group_name', $type_data['group_name']); |
110
|
|
|
|
111
|
|
|
parent::create_insert_array($type_data, $pre_create_data); |
112
|
|
|
} |
113
|
|
|
} |
114
|
|
|
|
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