mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-10-22 15:05:33 +00:00
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:
parent
ee3bbe3c95
commit
0c8b63b929
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user