Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MINOR Additional fixes for install.php (see r101063) (from r101067)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/trunk@112212 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
commit 77137e1bb24bcb0477d1eb68978c2d4497b2d38b 1 parent c5dc242
sminnee authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 install.php
View
18 install.php
@@ -809,9 +809,10 @@ function install($config) {
$phpVersion = urlencode(phpversion());
$encWebserver = urlencode($webserver);
$type = $config['db']['type'];
+ $dbConfig = $config['db'][$type];
if($type == 'MySQLDatabase') {
- $conn = @mysql_connect($config['db'][$type]['server'], null, null);
+ $conn = @mysql_connect($dbConfig['server'], null, null);
$databaseVersion = urlencode('MySQLDatabase: ' . mysql_get_server_info());
} else {
$databaseVersion = $type;
@@ -845,7 +846,7 @@ function install($config) {
\$project = 'mysite';
global \$database;
-\$database = '{$config['db'][$type]['database']}';
+\$database = '{$dbConfig['database']}';
require_once('conf/ConfigureFromEnv.php');
@@ -866,10 +867,9 @@ function install($config) {
} else {
$this->statusMessage("Setting up 'mysite/_config.php'...");
-
- $devServers = $this->var_export_array_nokeys(explode("\n", $_POST['devsites']));
- $escapedPassword = addslashes($config['db'][$type]['password']);
+ $devServers = $this->var_export_array_nokeys(explode("\n", $_POST['devsites']));
+ $escapedPassword = addslashes($dbConfig['password']);
$this->writeToFile("mysite/_config.php", <<<PHP
<?php
@@ -879,11 +879,11 @@ function install($config) {
global \$databaseConfig;
\$databaseConfig = array(
"type" => '{$type}',
- "server" => '{$config['db'][$type]['server']}',
- "username" => '{$config['db'][$type]['username']}',
+ "server" => '{$dbConfig['server']}',
+ "username" => '{$dbConfig['username']}',
"password" => '{$escapedPassword}',
- "database" => '{$config['db'][$type]['database']}',
- "path" => '{$config['db'][$type]['path']}',
+ "database" => '{$dbConfig['database']}',
+ "path" => '{$dbConfig['path']}',
);
// Sites running on the following servers will be
Please sign in to comment.
Something went wrong with that request. Please try again.