SetPermissionsCommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 19
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 11 1
1
<?php
2
3
Yii::import('composer.crisu83.yii-consoletools.commands.PermissionsCommand');
4
5
/**
6
 * Sets the correct permissions for certain files and directories
7
 *
8
 * @author Sam Stenvall <[email protected]>
9
 * @copyright Copyright &copy; Sam Stenvall 2014-
10
 * @license https://www.gnu.org/licenses/gpl.html The GNU General Public License v3.0
11
 */
12
class SetPermissionsCommand extends PermissionsCommand
13
{
14
15
	/**
16
	 * Initializes the command. Here we define the permissions that need to be 
17
	 * set and the base path under which the specified files/directories are 
18
	 * located.
19
	 */
20
	public function init()
21
	{
22
		$this->permissions = array(
23
			'assets'=>array('mode'=>0777),
24
			'images/image-cache'=>array('mode'=>0777),
25
			'protected/data'=>array('mode'=>0777),
26
			'protected/data/xbmc-video-server.db'=>array('mode'=>0666),
27
			'protected/runtime'=>array('mode'=>0777),
28
		);
29
30
		$this->basePath = realpath(__DIR__.'/../../');
31
	}
32
33
}