mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-10-22 17:05:33 +02:00
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:
parent
21b75a3d6e
commit
3f34c41315
@ -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…
Reference in New Issue
Block a user