1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* |
4
|
|
|
* Auto Groups extension for the phpBB Forum Software package. |
5
|
|
|
* |
6
|
|
|
* @copyright (c) 2015 phpBB Limited <https://www.phpbb.com> |
7
|
|
|
* @license GNU General Public License, version 2 (GPL-2.0) |
8
|
|
|
* |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
namespace phpbb\autogroups\migrations\v10x; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* Migration stage 8: Group default exemption data |
15
|
|
|
*/ |
16
|
|
|
class m8_default_exemption_data extends \phpbb\db\migration\migration |
|
|
|
|
17
|
|
|
{ |
18
|
|
|
/** |
19
|
|
|
* Assign migration file dependencies for this migration |
20
|
|
|
* |
21
|
|
|
* @return array Array of migration files |
22
|
|
|
* @static |
23
|
|
|
* @access public |
24
|
|
|
*/ |
25
|
|
|
public static function depends_on() |
26
|
|
|
{ |
27
|
|
|
return array( |
28
|
|
|
'\phpbb\autogroups\migrations\v10x\m3_config_data', |
29
|
|
|
'\phpbb\autogroups\migrations\v10x\m7_default_exemption_schema' |
30
|
|
|
); |
31
|
|
|
} |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* Add or update data in the database |
35
|
|
|
* |
36
|
|
|
* @return array Array of table data |
37
|
|
|
* @access public |
38
|
|
|
*/ |
39
|
|
|
public function update_data() |
40
|
|
|
{ |
41
|
|
|
return array( |
42
|
|
|
// Remove deprecated config item |
43
|
|
|
array('config.remove', array('autogroups_default_exempt')), |
44
|
|
|
|
45
|
|
|
// Enable default exemption for Administrators and Global Mods |
46
|
|
|
array('custom', array(array($this, 'update_default_exempt_groups'))), |
47
|
|
|
); |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* Set Administrators and Global Moderators to default exempt |
52
|
|
|
* |
53
|
|
|
* @return void |
54
|
|
|
* @access public |
55
|
|
|
*/ |
56
|
|
|
public function update_default_exempt_groups() |
57
|
|
|
{ |
58
|
|
|
$sql = 'UPDATE ' . GROUPS_TABLE . ' |
|
|
|
|
59
|
|
|
SET autogroup_default_exempt = 1 |
60
|
|
|
WHERE ' . $this->db->sql_in_set('group_name', array('ADMINISTRATORS', 'GLOBAL_MODERATORS')); |
61
|
|
|
$this->db->sql_query($sql); |
62
|
|
|
} |
63
|
|
|
} |
64
|
|
|
|
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