API CHANGE: Added SS_DATABASE_CLASS as an option for _ss_environment.php

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77890 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-05-26 23:45:54 +00:00
parent 2370dd0b38
commit eeff813be2

View File

@ -8,6 +8,8 @@
* your site. * your site.
* *
* Your database connection will be set up using these defines: * Your database connection will be set up using these defines:
* - SS_DATABASE_CLASS: The database class to use, MySQLDatabase, MSSQLDatabase, etc. defaults to
* MySQLDatabase
* - SS_DATABASE_SERVER: The database server to use, defaulting to localhost * - SS_DATABASE_SERVER: The database server to use, defaulting to localhost
* - SS_DATABASE_USERNAME: The databsae username (mandatory) * - SS_DATABASE_USERNAME: The databsae username (mandatory)
* - SS_DATABASE_PASSWORD: The database password (mandatory) * - SS_DATABASE_PASSWORD: The database password (mandatory)
@ -73,7 +75,7 @@ if(!isset($database) || !$database) {
if(defined('SS_DATABASE_USERNAME') && defined('SS_DATABASE_PASSWORD')) { if(defined('SS_DATABASE_USERNAME') && defined('SS_DATABASE_PASSWORD')) {
global $databaseConfig; global $databaseConfig;
$databaseConfig = array( $databaseConfig = array(
"type" => "MySQLDatabase", "type" => defined('SS_DATABASE_CLASS') ? SS_DATABASE_CLASS : "MySQLDatabase",
"server" => defined('SS_DATABASE_SERVER') ? SS_DATABASE_SERVER : 'localhost', "server" => defined('SS_DATABASE_SERVER') ? SS_DATABASE_SERVER : 'localhost',
"username" => SS_DATABASE_USERNAME, "username" => SS_DATABASE_USERNAME,
"password" => SS_DATABASE_PASSWORD, "password" => SS_DATABASE_PASSWORD,