-
Notifications
You must be signed in to change notification settings - Fork 6
/
index_dbv.php
70 lines (58 loc) · 1.9 KB
/
index_dbv.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config.php';
/**
* Your database authentication information goes here
* @see http://dbv.vizuina.com/documentation/
*/
define('DB_HOST', $config->db->host);
define('DB_PORT', '3306');
define('DB_USERNAME', $config->db->user);
define('DB_PASSWORD', $config->db->password);
define('DB_NAME', $config->db->database);
/**
* Authentication data for access to DBV itself
* If you leave any of the two constants below blank, authentication will be disabled
* @see http://dbv.vizuina.com/documentation/#optional-settings
*/
define('DBV_USERNAME', '');
define('DBV_PASSWORD', '');
/**
* @see http://dbv.vizuina.com/documentation/#writing-adapters
*/
define('DB_ADAPTER', 'MySQL');
define('DS', DIRECTORY_SEPARATOR);
define('DBV_ROOT_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'dbv');
/**
* Only edit this lines if you want to place your schema files in custom locations
* @see http://dbv.vizuina.com/documentation/#optional-settings
*/
define('DBV_DATA_PATH', DBV_ROOT_PATH . DS . 'data');
define('DBV_SCHEMA_PATH', DBV_DATA_PATH . DS . 'schema');
define('DBV_REVISIONS_PATH', DBV_DATA_PATH . DS . 'revisions');
define('DBV_META_PATH', DBV_DATA_PATH . DS . 'meta');
/**
* Select revision storage
* ADAPTER - store in DB
* FILE - store on disk
*/
define('DBV_REVISION_STORAGE', 'FILE');
/**
* Revision table name
*/
define('DBV_REVISION_TABLE', 'dbv_revision');
ini_set('magic_quotes_gpc', 'Off');
error_reporting(E_ALL ^ E_NOTICE);
/**
* I18n support
*/
define('DBV_LANGUAGES_PATH', DBV_ROOT_PATH . DS . 'languages');
define('DEFAULT_LOCALE', 'en_US');
define('DEFAULT_ENCODING', 'UTF-8');
define('DEFAULT_DOMAIN', 'default');
putenv("LC_ALL=".DEFAULT_LOCALE);
setlocale(LC_ALL, DEFAULT_LOCALE);
require_once DBV_ROOT_PATH . '/lib/functions.php';
require_once DBV_ROOT_PATH . '/DBV.php';
$dbv = DBV::instance();
$dbv->authenticate();
$dbv->dispatch();