diff --git a/install.php b/install.php index b769bc6..39c0483 100644 --- a/install.php +++ b/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)