From 82fbbb84f98446c6deab1d0d4855893476d8fb6e Mon Sep 17 00:00:00 2001
From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com>
Date: Sat, 13 Dec 2025 20:45:37 +0100
Subject: [PATCH] Continent update is fixed
---
application/models/Logbookadvanced_model.php | 8 ++-
.../views/logbookadvanced/checkresult.php | 11 +++-
.../views/logbookadvanced/dbtoolsdialog.php | 2 +-
application/views/logbookadvanced/index.php | 2 -
assets/js/sections/logbookadvanced.js | 58 ++++++++++---------
5 files changed, 46 insertions(+), 35 deletions(-)
diff --git a/application/models/Logbookadvanced_model.php b/application/models/Logbookadvanced_model.php
index 56a22f707..99a63b834 100644
--- a/application/models/Logbookadvanced_model.php
+++ b/application/models/Logbookadvanced_model.php
@@ -1397,7 +1397,8 @@ class Logbookadvanced_model extends CI_Model {
JOIN dxcc_entities ON " . $this->config->item('table_name') . ".col_dxcc = dxcc_entities.adif
JOIN station_profile on " . $this->config->item('table_name') . ".station_id = station_profile.station_id
SET col_cont = dxcc_entities.cont
- WHERE COALESCE(" . $this->config->item('table_name') . ".col_cont, '') = '' and station_profile.user_id = ?";
+ WHERE (COALESCE(" . $this->config->item('table_name') . ".col_cont, '') = '' or " . $this->config->item('table_name') . ".col_cont not in ('AF', 'AN', 'AS', 'EU', 'NA', 'OC', 'SA'))
+ and station_profile.user_id = ?";
$query = $this->db->query($sql, array($this->session->userdata('user_id')));
$result = $this->db->affected_rows();
@@ -1480,7 +1481,10 @@ class Logbookadvanced_model extends CI_Model {
$sql = "select count(*) as count from " . $this->config->item('table_name') . "
join station_profile on " . $this->config->item('table_name') . ".station_id = station_profile.station_id
where user_id = ?
- and (coalesce(col_cont, '') = '' or col_cont not in ('AF', 'AN', 'AS', 'EU', 'NA', 'OC', 'SA'))";
+ and (coalesce(col_cont, '') = '' or col_cont not in ('AF', 'AN', 'AS', 'EU', 'NA', 'OC', 'SA'))
+ and col_dxcc is not null
+ and col_dxcc != ''
+ and col_dxcc != 0";
$bindings[] = [$this->session->userdata('user_id')];
diff --git a/application/views/logbookadvanced/checkresult.php b/application/views/logbookadvanced/checkresult.php
index d3c8087a0..faf15a39b 100644
--- a/application/views/logbookadvanced/checkresult.php
+++ b/application/views/logbookadvanced/checkresult.php
@@ -28,7 +28,7 @@ function check_missing_distance($result) { ?>
= __("Update all QSOs with the distance based on your gridsquare set in the station profile, and the gridsquare of the QSO partner. Distance will be calculated based on if short path or long path is set."); ?>
= __("This is useful if you have imported QSOs without distance information."); ?>
= __("Update will only set the distance for QSOs where the distance is empty."); ?>
-
+
@@ -39,8 +39,13 @@ function check_qsos_missing_continent($result) { ?>