1
0
mirror of https://github.com/locomotivemtl/locomotive-boilerplate.git synced 2026-01-15 00:55:08 +08:00

Minor config fixes

This commit is contained in:
Mathieu Ducharme
2015-03-13 17:47:51 -04:00
parent 3aab8ea8b3
commit e4e037fc2e
3 changed files with 62 additions and 53 deletions

View File

@@ -1,51 +1,44 @@
{
"project_name":"Boilerplate",
"databases":{
"local":{
"database":"boilerplate",
"username":"root",
"password":""
},
"lab":{
"database":"",
"username":"",
"password":""
},
"live":{
"database":"",
"username":"",
"password":""
}
},
"default_database":"local",
"languages":{
"fr":{
"active":true
},
"en":{
"active":true
}
},
"default_language":"fr",
"modules":{
"admin":{},
"cms":{},
"newsletter":{},
"boilerplate":{}
},
"objects":{
},
"apis":{
},
"url_options":{
"use_rewrite":true
}
}
"project_name": "Boilerplate",
"databases": {
"local": {
"database": "gdfg",
"username": "root",
"password": ""
},
"lab": {
"database": "",
"username": "",
"password": ""
},
"live": {
"database": "",
"username": "",
"password": ""
}
},
"default_database": "local",
"languages": {
"fr": {
"active": true
},
"en": {
"active": true
}
},
"default_language": "fr",
"modules": {
"admin": [],
"cms": [],
"newsletter": [],
"boilerplate": []
},
"objects": [],
"apis": [],
"url_options": {
"use_rewrite": true
},
"debug":{
"active":false
}
}

View File

@@ -0,0 +1,5 @@
{
"debug":{
"active":true
}
}

View File

@@ -7,16 +7,27 @@
error_reporting(E_ALL & ~E_STRICT);
ini_set('display_errors', true);
// Environment defaults
date_default_timezone_set('America/Montreal');
// Main Charcoal include. This is where the Charcoal autoloader is defined.
include __DIR__.'/../charcoal/charcoal.php';
// JSON Configuration
Charcoal::add_config(__DIR__.'/config.json');
$application_env = Charcoal::application_env();
if(file_exists(__DIR__ . '/config.'.$application_env.'.json')) {
Charcoal::add_config(__DIR__ . '/config.'.$application_env.'.json');
}
// Environment defaults
date_default_timezone_set('America/Montreal');
// Configuration overwrite
Charcoal::$config['ROOT'] = realpath(__DIR__).'/../';
Charcoal::$config['URL'] = 'http://'.$_SERVER['HTTP_HOST'].'/';
if(isset($_SERVER['HTTP_HOST'])) {
Charcoal::$config['URL'] = 'http://'.$_SERVER['HTTP_HOST'].'/';
}
else {
Charcoal::$config['URL'] = 'http://localhost/';
}