Permalink
Browse files

BUGFIX Install now supports sending database version if available fro…

…m the helper (from r105711)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/trunk@112393 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 66dfdb9 commit 49bf14177fbe809459e7afeb97cd448f4d3047a5 sminnee committed Oct 15, 2010
Showing with 7 additions and 6 deletions.
  1. +7 −6 install.php
View
@@ -916,12 +916,13 @@ function install($config) {
$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";

0 comments on commit 49bf141

Please sign in to comment.