BUGFIX Installer now looks in DatabaseRegistry for adapter when checking database requirements

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.4@100894 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
sharvey 2010-03-11 05:06:25 +00:00 committed by Sam Minnee
parent ee3bbe3c95
commit 0c8b63b929

View File

@ -638,7 +638,11 @@ class InstallRequirements {
* @param string $databaseClass e.g. MySQLDatabase or MSSQLDatabase
*/
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 new $class();
}