1 | <?php |
||
12 | class c2_update_data extends \phpbb\db\migration\migration |
||
13 | { |
||
14 | /** |
||
15 | * Skip this migration if the module_dir column does not exist |
||
16 | * |
||
17 | * @return bool True to skip this migration, false to run it |
||
18 | * @access public |
||
19 | */ |
||
20 | public function effectively_installed() |
||
21 | { |
||
22 | return !isset($this->config['pt_parent_forum_id']); |
||
23 | } |
||
24 | |||
25 | public function update_data() |
||
26 | { |
||
27 | return array( |
||
28 | array('config.remove', array('cms_enabled')), |
||
29 | array('config.remove', array('cms_version')), |
||
30 | array('config.remove', array('primetime_gc')), |
||
31 | array('config.remove', array('primetime_last_gc')), |
||
32 | array('config.remove', array('cms_forum_changed')), |
||
33 | array('config.remove', array('pt_parent_forum_id')), |
||
34 | |||
35 | array('config.add', array('sitemaker_parent_forum_id', (int) $this->config['pt_parent_forum_id'])), |
||
36 | |||
37 | array('permission.remove', array('a_cms_mods')), |
||
38 | array('permission.remove', array('a_cms_manage_mods')), |
||
39 | array('permission.remove', array('a_cms_blocks')), |
||
40 | ); |
||
41 | } |
||
42 | } |
||
43 |