-
Notifications
You must be signed in to change notification settings - Fork 2
/
_config.php
72 lines (59 loc) · 1.41 KB
/
_config.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
71
72
<?php
/**
* SilverStripe project configuration
* Some practical and opinionated defaults
*/
/**
* Global $project definition
* Rename at will
*/
global $project;
$project = 'ss-project-boilerblate';
/**
* Database definition
* Update with you DB config if not using environment
*/
/*::config:dev*/
global $database;
$database = 'ss-project-boilerblate';
/*::config*/
/*::config:live
global $databaseConfig;
$databaseConfig = array(
'type' => 'MySQLDatabase',
'server' => 'localhost',
'username' => '',
'password' => '',
'database' => '',
'path' => ''
);
::config*/
/**
* Environment management
*/
require_once('conf/ConfigureFromEnv.php');
/**
* Define global for this project root folder.
* Rename at will but remmeber to update _config/HtmlEditorConfig.php too.
*
* This is mainly used with the {@link TemplateGlobalProvider}
* to define tempalte vairable {@see Page_Controller}.
*/
if(!defined('SS_PROJECT_BOILERPLATE_ROOT')) {
define('SS_PROJECT_BOILERPLATE_ROOT', rtrim(basename(dirname(__FILE__))));
}
/**
* Setting up the locale
*/
i18n::set_locale('en_US');
/**
* Load custom HTMLEditorConfig
* Put in a separate file to keep things tidy
*/
require_once('_config/HtmlEditorConfig.php');
/**
* Error logging
*/
SS_Log::add_writer(new SS_LogFileWriter(__DIR__ . '/_logs/ss.txt'), SS_Log::DEBUG, '<=');
ini_set('log_errors', 'On');
ini_set('error_log', __DIR__ . '/_logs/php.txt');