BUGFIX Installer now looks in DatabaseRegistry for adapter when checking database requirements (from r100894)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/trunk@112207 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
sminnee 2010-10-13 04:25:12 +00:00
parent 21b75a3d6e
commit 3f34c41315

View File

@ -638,7 +638,11 @@ class InstallRequirements {
* @param string $databaseClass e.g. MySQLDatabase or MSSQLDatabase * @param string $databaseClass e.g. MySQLDatabase or MSSQLDatabase
*/ */
function getDatabaseConfigurationHelper($databaseClass) { function getDatabaseConfigurationHelper($databaseClass) {
$class = $databaseClass . 'ConfigurationHelper'; $adapters = DatabaseAdapterRegistry::adapters();
if(isset($adapters[$databaseClass])) {
$helperPath = $adapters[$databaseClass]['helperPath'];
$class = str_replace('.php', '', basename($helperPath));
}
return (class_exists($class)) ? new $class() : new MySQLDatabaseConfigurationHelper(); return (class_exists($class)) ? new $class() : new MySQLDatabaseConfigurationHelper();
return new $class(); return new $class();
} }