release_0_2_0_data::update_data()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 16
rs 9.4285
cc 1
eloc 10
nc 1
nop 0
1
<?php
2
/**
3
*
4
* @package phpBB Extension - tas2580 Social Media Buttons
5
* @copyright (c) 2014 tas2580 (https://tas2580.net)
6
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
7
*
8
*/
9
10
namespace tas2580\socialbuttons\migrations;
11
12
class release_0_2_0_data extends \phpbb\db\migration\migration
13
{
14
	public function effectively_installed()
15
	{
16
		return isset($this->config['socialbuttons_version']) && version_compare($this->config['socialbuttons_version'], '0.2.0', '>=');
17
	}
18
19
	public function update_data()
20
	{
21
		return array(
22
			// Add configs
23
			array('config.add', array('socialbuttons_multiplicator', '3600')),
24
			array('config.add', array('socialbuttons_cachetime', '24')),
25
			array('config.add', array('socialbuttons_position', '2')),
26
			array('config.add', array('socialbuttons_facebook', '1')),
27
			array('config.add', array('socialbuttons_twitter', '1')),
28
			array('config.add', array('socialbuttons_google', '1')),
29
			array('config.add', array('socialbuttons_linkedin', '1')),
30
31
			// Keep track of version in the database
32
			array('config.add', array('socialbuttons_version', '0.2.0')),
33
		);
34
	}
35
}
36