Completed
Push — 3.2.x ( 83259b...375400 )
by Erwan
02:07
created

fix_thumbnails   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A depends_on() 0 6 1
A update_data() 0 9 1
1
<?php
2
/**
3
*
4
* phpBB Directory extension for the phpBB Forum Software package.
5
*
6
* @copyright (c) 2014 ErnadoO <http://www.phpbb-services.com>
7
* @license GNU General Public License, version 2 (GPL-2.0)
8
*
9
*/
10
11
namespace ernadoo\phpbbdirectory\migrations\v20x;
12
13
class fix_thumbnails extends \phpbb\db\migration\migration
14
{
15
	static public function depends_on()
16
	{
17
		return array(
18
			'\ernadoo\phpbbdirectory\migrations\v10x\v1_0_0',
19
		);
20
	}
21
22
	/**
23
	* @inheritDoc
24
	*/
25
	public function update_data()
26
	{
27
		return array(
28
			array('if', array(
29
				(preg_match('#^http:#', $this->config['dir_thumb_service'])),
30
				array('config.update', array('dir_thumb_service', str_replace('http:', 'https:', $this->config['dir_thumb_service']))),
31
			)),
32
		);
33
	}
34
}
35