Viscacha::setDefines()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
/**
3
 * @name      OpenImporter
4
 * @copyright OpenImporter contributors
5
 * @license   BSD https://opensource.org/licenses/BSD-3-Clause
6
 *
7
 * @version 1.0
8
 */
9
10
/**
11
 * Settings for the Viscacha system.
12
 * Viscacha 0.8
13
 */
14
class Viscacha extends Importers\AbstractSourceImporter
15
{
16
	protected $setting_file = '/data/config.inc.php';
17
18
	public function getName()
19
	{
20
		return 'Viscacha 0.8';
21
	}
22
23
	public function getVersion()
24
	{
25
		return 'ElkArte 1.0';
26
	}
27
28
	public function setDefines()
29
	{
30
		define('VISCACHA_CORE', 1);
31
	}
32
33
	public function getPrefix()
34
	{
35
		// @todo Convert the use of globals to a scan of the file or something similar.
36
		global $config;
37
38
		return '`' . $this->getDbName() . '`.' . $config['dbprefix'];
39
	}
40
41
	public function getDbName()
42
	{
43
		// @todo Convert the use of globals to a scan of the file or something similar.
44
		global $config;
45
46
		return $config['database'];
47
	}
48
49
	public function getTableTest()
50
	{
51
		return 'user';
52
	}
53
}
54