config-switch to disable qsl-image-feature

This commit is contained in:
int2001
2024-06-06 05:29:15 +00:00
parent 96d0eb73f2
commit f0a73c9177
4 changed files with 8 additions and 0 deletions

View File

@@ -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;

View File

@@ -11,6 +11,7 @@ class Qsl extends CI_Controller {
$this->lang->load('qslcard');
$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.

View File

@@ -99,8 +99,10 @@
<div class="dropdown-divider"></div>
<li><a class="dropdown-item" href="<?php echo site_url('logbookadvanced'); ?>"><i class="fas fa-book-open"></i> <?php echo lang('menu_advanced'); ?></a></li>
<div class="dropdown-divider"></div>
<?php if (!($this->config->item('disable_qsl') ?? false)) { ?>
<li><a class="dropdown-item" href="<?php echo site_url('qsl'); ?>" title="QSL"><i class="fa fa-id-card"></i> <?php echo lang('menu_view_qsl'); ?></a></li>
<div class="dropdown-divider"></div>
<?php } ?>
<li><a class="dropdown-item" href="<?php echo site_url('eqsl'); ?>" title="eQSL"><i class="fa fa-id-card"></i> <?php echo lang('menu_view_eqsl'); ?></a></li>
</ul>
</li>

View File

@@ -596,6 +596,7 @@
?>
<div class="tab-pane fade" id="qslupload" role="tabpanel" aria-labelledby="table-tab">
<?php
if (!($this->config->item('disable_qsl') ?? false)) {
if (count($qslimages) > 0) {
echo '<table style="width:100%" class="qsltable table table-sm table-bordered table-hover table-striped table-condensed">
<thead>
@@ -644,6 +645,7 @@
</div>
</div>
</form>
<?php } ?>
<p>
<div class="row">
<div class="col-md">