From 0c8b63b9292a8a536748f761b5ae0a762ecba398 Mon Sep 17 00:00:00 2001 From: sharvey Date: Thu, 11 Mar 2010 05:06:25 +0000 Subject: [PATCH] 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 --- install.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install.php b/install.php index 66c50b5..b186151 100644 --- a/install.php +++ b/install.php @@ -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(); }