mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-10-22 17:05:33 +02:00
BUGFIX Checkbox for overriding the install from environment now checks for the file existance properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.4@98688 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
084acb6133
commit
62366a72e3
10
install.php
10
install.php
@ -31,15 +31,25 @@ if($majorVersion < 5) {
|
||||
|
||||
// Include environment files
|
||||
$usingEnv = false;
|
||||
$envFileExists = false;
|
||||
$envFiles = array('_ss_environment.php', '../_ss_environment.php', '../../_ss_environment.php');
|
||||
foreach($envFiles as $envFile) {
|
||||
if(@file_exists($envFile)) {
|
||||
include_once($envFile);
|
||||
$envFileExists = true;
|
||||
$usingEnv = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if($envFileExists) {
|
||||
if(!empty($_REQUEST['useEnv'])) {
|
||||
$usingEnv = true;
|
||||
} else {
|
||||
$usingEnv = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Load database config
|
||||
if(isset($_REQUEST['db'])) {
|
||||
// Disabled inputs don't submit anything - we need to use the environment (except the database name)
|
||||
|
Loading…
Reference in New Issue
Block a user