diff --git a/.gitignore b/.gitignore index 807d68fdf..78a5dd619 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ cache/* local/config/build.properties +local/config/config_db.php +local/config/build diff --git a/core/bootstrap.php b/core/bootstrap.php index 1f1337b00..4260a0f09 100644 --- a/core/bootstrap.php +++ b/core/bootstrap.php @@ -3,9 +3,6 @@ if (!isset($env)) { $env = 'prod'; } -// -//use Symfony\Component\DependencyInjection; -//use Symfony\Component\DependencyInjection\Reference; /** * @@ -16,3 +13,10 @@ if (!isset($env)) { $loader = require __DIR__ . '/autoload.php'; define('THELIA_ROOT', __DIR__ .'/../'); + +if(file_exists(THELIA_ROOT . '/local/config/config_db.php')) +{ + require THELIA_ROOT . '/local/config/config_db.php'; +} else { + define('THELIA_INSTALL_MODE',true); +} diff --git a/local/config/config_db.mysql.php b/local/config/config_db.mysql.php index e69a0e2ef..e6ae36e8b 100644 --- a/local/config/config_db.mysql.php +++ b/local/config/config_db.mysql.php @@ -4,13 +4,13 @@ // --------------------------------------------- //database type : mysql, sqlite, pgsql, etc -define('THELIA_DB_TYPE','mysql'); +define('THELIA_DB_ADAPTER','mysql'); // database login -define('THELIA_BD_LOGIN', '__DB_LOGIN__'); +define('THELIA_DB_USER', '__DB_LOGIN__'); // database password -define('THELIA_BD_PASSWORD', '__DB_PASSWORD__'); +define('THELIA_DB_PASSWORD', '__DB_PASSWORD__'); //database DSN define('THELIA_DB_DSN','mysql:dbname=__DB_NAME__;host:__DB_HOST__'); diff --git a/local/config/config_db.oracle.php b/local/config/config_db.oracle.php new file mode 100644 index 000000000..dfb14113e --- /dev/null +++ b/local/config/config_db.oracle.php @@ -0,0 +1,16 @@ + + array ( + 'thelia' => + array ( + 'adapter' => THELIA_DB_ADAPTER, + 'connection' => + array ( + 'dsn' => THELIA_DB_DSN, + 'user' => THELIA_DB_USER, + 'password' => THELIA_DB_PASSWORD, + ), + ), + ), + 'generator_version' => '1.6.7', +); +return $conf; \ No newline at end of file