Passed
Push — release-3.0.0 ( 069487...077e8e )
by Daniel
03:37
created

c1_update_config   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
c 0
b 0
f 0
dl 0
loc 17
rs 10
wmc 2
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\content\migrations\converter;
11
12
class c1_update_config extends \phpbb\db\migration\migration
13
{
14
	/**
15
	 * Skip this migration if the config variable content_forum_id 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['content_forum_id']);
23
	}
24
25
	public function update_data()
26
	{
27
		return array(
28
			array('config.add', array('blitze_content_forum_id', (int) $this->config['content_forum_id']))
29
		);
30
	}
31
}
32