mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #1989 from dhensby/patch-environment-regression
Regression due to previous patch
This commit is contained in:
commit
b9b83a784c
@ -31,6 +31,8 @@ if (function_exists('session_start')) {
|
|||||||
/**
|
/**
|
||||||
* Include _ss_environment.php file
|
* Include _ss_environment.php file
|
||||||
*/
|
*/
|
||||||
|
$usingEnv = false;
|
||||||
|
$envFileExists = false;
|
||||||
//define the name of the environment file
|
//define the name of the environment file
|
||||||
$envFile = '_ss_environment.php';
|
$envFile = '_ss_environment.php';
|
||||||
//define the dirs to start scanning from (have to add the trailing slash)
|
//define the dirs to start scanning from (have to add the trailing slash)
|
||||||
@ -53,8 +55,10 @@ foreach ($dirsToCheck as $dir) {
|
|||||||
if (@is_readable($dir)) {
|
if (@is_readable($dir)) {
|
||||||
//if the file exists, then we include it, set relevant vars and break out
|
//if the file exists, then we include it, set relevant vars and break out
|
||||||
if (file_exists($dir . $envFile)) {
|
if (file_exists($dir . $envFile)) {
|
||||||
define('SS_ENVIRONMENT_FILE', $dir . $envFile);
|
include_once($dir . $envFile);
|
||||||
include_once(SS_ENVIRONMENT_FILE);
|
$envFileExists = true;
|
||||||
|
//legacy variable assignment
|
||||||
|
$usingEnv = true;
|
||||||
//break out of BOTH loops because we found the $envFile
|
//break out of BOTH loops because we found the $envFile
|
||||||
break(2);
|
break(2);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user