From 7117a1095a1d9e18580f85b25e63dd6639827e2a Mon Sep 17 00:00:00 2001
From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com>
Date: Fri, 12 Dec 2025 09:45:51 +0100
Subject: [PATCH] Fix updating missing DXCC
---
application/controllers/Logbookadvanced.php | 6 +-
application/models/Logbookadvanced_model.php | 2 +-
.../views/logbookadvanced/checkresult.php | 2 +-
.../views/logbookadvanced/dbtoolsdialog.php | 2 +-
assets/js/sections/logbookadvanced.js | 87 ++++++++++++-------
5 files changed, 64 insertions(+), 35 deletions(-)
diff --git a/application/controllers/Logbookadvanced.php b/application/controllers/Logbookadvanced.php
index f343a180c..d1fbf2884 100644
--- a/application/controllers/Logbookadvanced.php
+++ b/application/controllers/Logbookadvanced.php
@@ -945,6 +945,10 @@ class Logbookadvanced extends CI_Controller {
$result = $this->logbookadvanced_model->check_missing_dxcc_id($all);
header("Content-Type: application/json");
- echo json_encode(__("The number of QSOs re-checked for DXCC was") .' ' . $result);
+ if ($all == 'false') {
+ echo json_encode(__("The number of QSOs updated for missing DXCC IDs was") .' ' . $result);
+ } else {
+ echo json_encode(__("The number of QSOs re-checked for DXCC was") .' ' . $result);
+ }
}
}
diff --git a/application/models/Logbookadvanced_model.php b/application/models/Logbookadvanced_model.php
index fa2b1707e..21881dcc6 100644
--- a/application/models/Logbookadvanced_model.php
+++ b/application/models/Logbookadvanced_model.php
@@ -1605,7 +1605,7 @@ class Logbookadvanced_model extends CI_Model {
$this->db->join('station_profile', 'station_profile.station_id = ' . $this->config->item('table_name') . '.station_id');
$this->db->where("station_profile.user_id", $this->session->userdata('user_id'));
- if (!$all) { // check which to update - records with no dxcc or all records
+ if ($all == 'false') { // check which to update - records with no dxcc or all records
$this->db->group_start();
$this->db->where("COL_DXCC is NULL");
$this->db->or_where("COL_DXCC = ''");
diff --git a/application/views/logbookadvanced/checkresult.php b/application/views/logbookadvanced/checkresult.php
index 73d4f7a05..7e4bf0e92 100644
--- a/application/views/logbookadvanced/checkresult.php
+++ b/application/views/logbookadvanced/checkresult.php
@@ -42,7 +42,7 @@ function check_missing_dxcc($result) { ?>
DXCC Check Results
QSOs to update found: count; ?>
-