Commit 84a87d28544c90d361e501aa1ac2141aa0c68b73
1 parent
bf0b8617
Exists in
master
by Eriksen: Atualizado arquivo para utilizar a variável de ambiente configurada no .htaccess
Showing
1 changed file
with
6 additions
and
2 deletions
Show diff stats
ieducar/includes/bootstrap.php
@@ -49,8 +49,12 @@ set_include_path($coreExt . PATH_SEPARATOR . get_include_path()); | @@ -49,8 +49,12 @@ set_include_path($coreExt . PATH_SEPARATOR . get_include_path()); | ||
49 | * Define o ambiente de configuração desejado. Verifica se existe uma variável | 49 | * Define o ambiente de configuração desejado. Verifica se existe uma variável |
50 | * de ambiente configurada ou define 'production' como padrão. | 50 | * de ambiente configurada ou define 'production' como padrão. |
51 | */ | 51 | */ |
52 | -defined('CORE_EXT_CONFIGURATION_ENV') || | ||
53 | - define('CORE_EXT_CONFIGURATION_ENV', 'development'); | 52 | +if (getenv('CORE_EXT_CONFIGURATION_ENV')) { |
53 | + define('CORE_EXT_CONFIGURATION_ENV', getenv('CORE_EXT_CONFIGURATION_ENV')); | ||
54 | +} | ||
55 | +else { | ||
56 | + define('CORE_EXT_CONFIGURATION_ENV', 'production'); | ||
57 | +} | ||
54 | 58 | ||
55 | // Arquivo de configuração INI | 59 | // Arquivo de configuração INI |
56 | $configFile = realpath(dirname(__FILE__) . '/../') . '/configuration/ieducar.ini'; | 60 | $configFile = realpath(dirname(__FILE__) . '/../') . '/configuration/ieducar.ini'; |