diff --git a/application/config/config.sample.php b/application/config/config.sample.php index 967fe5281..4bd68ba1c 100644 --- a/application/config/config.sample.php +++ b/application/config/config.sample.php @@ -692,3 +692,6 @@ $config['disable_manual_lotw'] = false; $config['disable_manual_eqsl'] = false; $config['disable_manual_hrdlog'] = false; $config['disable_manual_qrz'] = false; + +# Disables QSL-Image-Feature if true. if non-existant or false the QSL-Feature is enabled +$config['disable_qsl'] = false; diff --git a/application/controllers/Qsl.php b/application/controllers/Qsl.php index cf7899a93..5ada8266c 100644 --- a/application/controllers/Qsl.php +++ b/application/controllers/Qsl.php @@ -8,8 +8,9 @@ class Qsl extends CI_Controller { function __construct() { parent::__construct(); - $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'); } + $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_qsl') ?? false)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); exit; } } // Default view when loading controller. diff --git a/application/views/interface_assets/header.php b/application/views/interface_assets/header.php index c8a51d9de..0d1ccbb31 100644 --- a/application/views/interface_assets/header.php +++ b/application/views/interface_assets/header.php @@ -99,8 +99,10 @@