From 8869240b5af3307ab448bc677c1868fb03a0a7ec Mon Sep 17 00:00:00 2001 From: sharvey Date: Wed, 26 May 2010 05:08:26 +0000 Subject: [PATCH] BUGFIX Install now supports sending database version if available from the helper git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.4@105711 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- install.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/install.php b/install.php index 818cc81..b6c10ca 100644 --- a/install.php +++ b/install.php @@ -916,12 +916,13 @@ class Installer extends InstallRequirements { $phpVersion = urlencode(phpversion()); $encWebserver = urlencode($webserver); - - if($config['db']['type'] == 'MySQLDatabase') { - $conn = @mysql_connect($dbConfig['server'], null, null); - $databaseVersion = urlencode('MySQLDatabase: ' . mysql_get_server_info()); - } else { - $databaseVersion = $config['db']['type']; + $dbType = $config['db']['type']; + + // Try to determine the database version from the helper + $databaseVersion = ''; + $helper = $this->getDatabaseConfigurationHelper($dbType); + if($helper && method_exists($helper, 'getDatabaseVersion')) { + $databaseVersion = urlencode($dbType . ': ' . $helper->getDatabaseVersion($config['db'][$dbType])); } $url = "http://ss2stat.silverstripe.com/Installation/add?SilverStripe=$silverstripe_version&PHP=$phpVersion&Database=$databaseVersion&WebServer=$encWebserver";