From 2396aec9d6788dcea8a817368a0ac1cb4e15082f Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Mon, 5 Apr 2021 14:41:47 +0100 Subject: [PATCH] [Debug] If the ENVIRONMENT variable is set to development show debug options --- application/controllers/Debug.php | 3 +++ application/views/interface_assets/header.php | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/application/controllers/Debug.php b/application/controllers/Debug.php index 25bffcb6..c2854d20 100644 --- a/application/controllers/Debug.php +++ b/application/controllers/Debug.php @@ -7,6 +7,9 @@ class Debug extends CI_Controller { $this->load->model('user_model'); if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + if(ENVIRONMENT != "development") { + show_error("You must have global enviroment set to development", '403', $heading = 'An Error Was Encountered'); + } } /* User Facing Links to Backup URLs */ diff --git a/application/views/interface_assets/header.php b/application/views/interface_assets/header.php index 28f3627d..088d02da 100644 --- a/application/views/interface_assets/header.php +++ b/application/views/interface_assets/header.php @@ -146,10 +146,11 @@ Update Country Files + Debug Information - +