Completed
Push — develop ( 6f1d60...1f2a5d )
by Daniel
11:12
created

c2_update_data   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 31
rs 10
1
<?php
2
/**
3
 *
4
 * @package sitemaker
5
 * @copyright (c) 2013 Daniel A. (blitze)
6
 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
7
 *
8
 */
9
10
namespace blitze\sitemaker\migrations\converter;
11
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