diff --git a/config/vilesci.config-default.inc.php b/config/vilesci.config-default.inc.php index 049109471..7cfff8938 100644 --- a/config/vilesci.config-default.inc.php +++ b/config/vilesci.config-default.inc.php @@ -197,4 +197,7 @@ define('DVB_PORTAL', 'https://stubei-p.portal.at'); define('DVB_USERNAME','username'); // Passwort define('DVB_PASSWORD','passwort'); + +define('CI_ENVIRONMENT', 'development'); // Code igniter environment variable + ?> diff --git a/index.ci.php b/index.ci.php index 5514d9450..ad946373a 100644 --- a/index.ci.php +++ b/index.ci.php @@ -55,6 +55,14 @@ * */ +// Loads FHC config files +require_once 'config/global.config.inc.php'; +require_once 'config/vilesci.config.inc.php'; + +// Check if the CI_ENVIRONMENT constants is set and eventually use it to set the CI_ENV environment variable +if (defined('CI_ENVIRONMENT')) $_SERVER['CI_ENV'] = CI_ENVIRONMENT; + +// If the CI_ENV environment variable is not set then use "development" as default define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development'); /* @@ -65,7 +73,6 @@ define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'developm * Different environments will require different levels of error reporting. * By default development will show errors but testing and live will hide them. */ - switch (ENVIRONMENT) { case 'development': @@ -299,10 +306,6 @@ switch (ENVIRONMENT) * */ -// First load the FHC-Config-Files ... -require_once 'config/global.config.inc.php'; -require_once 'config/vilesci.config.inc.php'; - // ... and the vendor autoload include_once 'vendor/autoload.php';