Completed
Pull Request — master (#48)
by Jakub
11:14 queued 02:07
created

m11_ad_owner_data::update_data()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 18
rs 9.4285
cc 1
eloc 12
nc 1
nop 0
1
<?php
2
/**
3
 *
4
 * Advertisement management. An extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2017 phpBB Limited <https://www.phpbb.com>
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace phpbb\ads\migrations\v10x;
12
13
class m11_ad_owner_data extends \phpbb\db\migration\migration
14
{
15
	/**
16
	 * {@inheritDoc}
17
	 */
18
	static public function depends_on()
19
	{
20
		return array(
21
			'\phpbb\ads\migrations\v10x\m1_initial_schema',
22
			'\phpbb\ads\migrations\v10x\m9_views_clicks',
23
			'\phpbb\ads\migrations\v10x\m10_ad_owner_schema',
24
		);
25
	}
26
27
	/**
28
	 * Add the UCP module and new permission
29
	 *
30
	 * @return array Array of data update instructions
31
	 */
32
	public function update_data()
33
	{
34
		return array(
35
			array('module.add', array(
36
				'ucp',
37
				'',
38
				'UCP_PHPBB_ADS_TITLE'
39
			)),
40
			array('module.add', array(
41
				'ucp',
42
				'UCP_PHPBB_ADS_TITLE',
43
				array(
44
					'module_basename' => '\phpbb\ads\ucp\main_module',
45
					'modes'           => array('stats'),
46
				),
47
			)),
48
		);
49
	}
50
}
51