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();