diff --git a/.gitignore b/.gitignore index 39d9a71ba..6e1018213 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ sync.sh *.p12 *.swp +.debug \ No newline at end of file diff --git a/application/controllers/Dashboard.php b/application/controllers/Dashboard.php index b72d135d8..17f0f1362 100644 --- a/application/controllers/Dashboard.php +++ b/application/controllers/Dashboard.php @@ -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'); diff --git a/index.php b/index.php index 7d8fe56dd..fc458e605 100644 --- a/index.php +++ b/index.php @@ -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'); + } /* *---------------------------------------------------------------