From 09a6f4c11b89cafbe8591b1c802c3a24a40d9659 Mon Sep 17 00:00:00 2001 From: phl0 Date: Tue, 17 Dec 2024 11:52:30 +0100 Subject: [PATCH] Add option to enable eqsl massdownload Disabled by default bceause not thread safe. --- application/config/config.sample.php | 11 +++++++++++ application/controllers/Eqsl.php | 2 +- application/views/eqsl/download.php | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/application/config/config.sample.php b/application/config/config.sample.php index 6714dd9b8..69cfc3f4b 100644 --- a/application/config/config.sample.php +++ b/application/config/config.sample.php @@ -762,3 +762,14 @@ $config['disable_version_check'] = false; // $config['trxd_connection_type'] = 'ws'; // $config['trxd_ws_path'] = '/trx-control'; // $config['trxd_timeout'] = 5; + +/* +|-------------------------------------------------------------------------- +| eqsl.cc Massdownloa +|-------------------------------------------------------------------------- +| +| The eqsl.cc mass download function is not threadsafe. So it is disabled by default. +| Please consider enabling this carefully. Not recommended for multi-user environments. + */ + +$config['enable_eqsl_massdownload'] = false; diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php index dcc4a8808..3ab18cb7e 100644 --- a/application/controllers/Eqsl.php +++ b/application/controllers/Eqsl.php @@ -447,7 +447,7 @@ class eqsl extends CI_Controller { $errors = 0; $this->load->library('electronicqsl'); - if ($this->input->post('eqsldownload') == 'download') { + if ($this->input->post('eqsldownload') == 'download' && $this->config->item('enable_eqsl_massdownload')) { $i = 0; $this->load->model('eqslmethods_model'); $qslsnotdownloaded = $this->eqslmethods_model->eqsl_not_yet_downloaded(); diff --git a/application/views/eqsl/download.php b/application/views/eqsl/download.php index 31ccec277..d1022b312 100644 --- a/application/views/eqsl/download.php +++ b/application/views/eqsl/download.php @@ -65,7 +65,7 @@ foreach ($qslsnotdownloaded->result_array() as $qsl) { ?>

- config->item('disable_manual_eqsl'))) { + config->item('enable_eqsl_massdownload') && !($this->config->item('disable_manual_eqsl'))) { echo form_open_multipart('eqsl/download');?>