MINOR Reverted broken variables in installer for checking environment

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.4@98679 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
sharvey 2010-02-10 07:55:03 +00:00 committed by Sam Minnee
parent 8200a7e4e8
commit 084acb6133

View File

@ -40,21 +40,10 @@ foreach($envFiles as $envFile) {
}
}
// This is used by the checkbox to select whether to prefer environment or not
$shouldUseEnv = false;
if(!$_REQUEST) {
$shouldUseEnv = true;
}
if(isset($_REQUEST['useEnv']) && $_REQUEST['useEnv']) {
$shouldUseEnv = true;
}
// Load database config
if(isset($_REQUEST['db'])) {
// Disabled inputs don't submit anything - we need to use the environment (except the database name)
if($usingEnv && $shouldUseEnv) {
if($usingEnv) {
$_REQUEST['db'] = $databaseConfig = array(
"type" => defined('SS_DATABASE_CLASS') ? SS_DATABASE_CLASS : "MySQLDatabase",
"server" => defined('SS_DATABASE_SERVER') ? SS_DATABASE_SERVER : "localhost",
@ -78,7 +67,7 @@ if(isset($_REQUEST['db'])) {
if(isset($_REQUEST['admin'])) {
// Disabled inputs don't submit anything - we need to use the environment (except the database name)
if($usingEnv && $shouldUseEnv) {
if($usingEnv) {
$_REQUEST['admin'] = $adminConfig = array(
'username' => defined('SS_DEFAULT_ADMIN_USERNAME') ? SS_DEFAULT_ADMIN_USERNAME : 'admin',
'password' => defined('SS_DEFAULT_ADMIN_PASSWORD') ? SS_DEFAULT_ADMIN_PASSWORD : 'password',