- Added constat CI_ENVIRONMENT to config/vilesci.config-default.inc.php

- Changed index.ci.php to use CI_ENVIRONMENT to set the environment variable CI_ENV
This commit is contained in:
Paolo
2018-08-24 12:12:11 +02:00
parent c6ebe33c17
commit 56340e992f
2 changed files with 11 additions and 5 deletions
+3
View File
@@ -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
?>
+8 -5
View File
@@ -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';