Merge pull request #23 from AndreasK79/environment_change

Changed the way environment is set
This commit is contained in:
HB9HIL
2024-01-25 17:27:27 +01:00
committed by GitHub
3 changed files with 6 additions and 6 deletions

1
.gitignore vendored
View File

@@ -17,3 +17,4 @@
sync.sh
*.p12
*.swp
.debug

View File

@@ -4,11 +4,6 @@ class Dashboard extends CI_Controller {
public function index()
{
// If environment is set to development then show the debug toolbar
if(ENVIRONMENT == 'development') {
$this->output->enable_profiler(TRUE);
}
// Load language files
$this->lang->load('lotw');

View File

@@ -54,7 +54,11 @@
* NOTE: If you change these, also change the error_reporting() code below
*/
#define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');
define('ENVIRONMENT', 'development');
if (file_exists('.debug')) {
define('ENVIRONMENT', 'development');
} else {
define('ENVIRONMENT', 'production');
}
/*
*---------------------------------------------------------------