From 36e21c2380e8461b6ca81e40b155c5c4f41af4d6 Mon Sep 17 00:00:00 2001 From: Steven Dodd Date: Thu, 31 Jul 2025 15:55:07 +0100 Subject: [PATCH 1/3] Forced http version and added compression --- application/controllers/Qrz.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/controllers/Qrz.php b/application/controllers/Qrz.php index e06b02ff..d32a88e1 100644 --- a/application/controllers/Qrz.php +++ b/application/controllers/Qrz.php @@ -324,7 +324,7 @@ class Qrz extends CI_Controller { // Return the structured error array here too for consistency return ['status' => 'error', 'message' => $error_message]; } - $url = 'http://logbook.qrz.com/api'; // Correct URL + $url = 'https://logbook.qrz.com/api'; // Correct URL $post_data['KEY'] = $qrz_api_key; // Correct parameter $post_data['ACTION'] = 'FETCH'; // Correct parameter @@ -338,6 +338,9 @@ class Qrz extends CI_Controller { curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true); // Correct - get response as string curl_setopt( $ch, CURLOPT_TIMEOUT, 300); // 5 minute timeout curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 30); // 30 second connection timeout + curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); + curl_setopt($ch, CURLOPT_BUFFERSIZE, 128000); + curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate'); $content = curl_exec($ch); // Get raw content $curl_error = curl_error($ch); // Check for cURL errors From f4521dee313f7da73195d85e577cbec112111fca Mon Sep 17 00:00:00 2001 From: Steven Dodd Date: Thu, 31 Jul 2025 21:26:47 +0100 Subject: [PATCH 2/3] Fix mismatch between index key and match key for QRZ upload --- application/models/Logbook_model.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 12a70150..6befcc7c 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -4889,7 +4889,7 @@ class Logbook_model extends CI_Model foreach ($batch_data as $record) { $this->db->or_group_start(); // Start group for this record's AND conditions $this->db->where($this->config->item('table_name').'.COL_CALL', $record['call']); - $this->db->where($this->config->item('table_name').'.COL_TIME_ON', $record['time_on']); + $this->db->like($this->config->item('table_name').'.COL_TIME_ON', $record['time_on'], 'after'); $this->db->where($this->config->item('table_name').'.COL_BAND', $record['band']); $this->db->group_end(); // End group for this record's AND conditions } @@ -4902,7 +4902,8 @@ class Logbook_model extends CI_Model // Index DB results for faster lookup $indexed_results = []; foreach ($db_results as $row) { - $key = $row['COL_CALL'] . '|' . $row['COL_TIME_ON'] . '|' . $row['COL_BAND']; + $time = substr($row['COL_TIME_ON'], 0, 16); + $key = $row['COL_CALL'] . '|' . $time . '|' . $row['COL_BAND']; $indexed_results[$key] = $row['COL_PRIMARY_KEY']; } @@ -4989,4 +4990,4 @@ function validateADIFDate($date, $format = 'Ymd') { $d = DateTime::createFromFormat($format, $date); return $d && $d->format($format) == $date; -} \ No newline at end of file +} From 6f097893c9e98934c826fd609febcb77a8cbde50 Mon Sep 17 00:00:00 2001 From: Steven Dodd Date: Fri, 1 Aug 2025 11:44:03 +0100 Subject: [PATCH 3/3] Corrected QRZ batch download column name --- application/models/Logbook_model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 6befcc7c..0b7e394d 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -4921,7 +4921,7 @@ class Logbook_model extends CI_Model $update_batch_data[] = [ 'COL_PRIMARY_KEY' => $primary_key, 'COL_QRZCOM_QSO_DOWNLOAD_DATE' => $record['qsl_date'], - 'COL_QRZCOM_QSO_UPLOAD_STATUS' => $record['qsl_rcvd'] // Should be 'Y' if confirmed + 'COL_QRZCOM_QSO_DOWNLOAD_STATUS' => $record['qsl_rcvd'] // Should be 'Y' if confirmed ]; }