From b03872324b39db5c94db5533c22905107e2deeaa Mon Sep 17 00:00:00 2001 From: Christoph Kottke Date: Mon, 10 Jun 2024 14:57:10 +0200 Subject: [PATCH] * [OQRS] disable the entire controller --- application/controllers/Oqrs.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/application/controllers/Oqrs.php b/application/controllers/Oqrs.php index 5a77e36e6..4671408c7 100644 --- a/application/controllers/Oqrs.php +++ b/application/controllers/Oqrs.php @@ -14,11 +14,10 @@ class Oqrs extends CI_Controller { // Commented out to get public access // $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 (($this->config->item('disable_oqrs') ?? false)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } } public function index() { - if (($this->config->item('disable_oqrs') ?? false)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } - $this->load->model('oqrs_model'); $data['stations'] = $this->oqrs_model->get_oqrs_stations();