From 46e10768828629fec32e8aaeebfd67d2ed96cb6c Mon Sep 17 00:00:00 2001 From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com> Date: Tue, 27 Jan 2026 11:58:47 +0100 Subject: [PATCH] [DBTools] Fix for sat in band --- application/models/Logbookadvanced_model.php | 9 +++++---- application/views/logbookadvanced/checkresult.php | 8 ++++---- assets/js/sections/logbookadvanced.js | 1 + 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/application/models/Logbookadvanced_model.php b/application/models/Logbookadvanced_model.php index 6b9984841..5231ffef4 100644 --- a/application/models/Logbookadvanced_model.php +++ b/application/models/Logbookadvanced_model.php @@ -1664,7 +1664,7 @@ class Logbookadvanced_model extends CI_Model { return ['status' => 'error', 'message' => __("VuccGrids table is empty. Please import the VUCC grids data first.")]; } - $sql = "select col_primary_key, col_time_on, col_call, col_band, col_gridsquare, col_dxcc, col_country, station_profile_name, col_lotw_qsl_rcvd, col_mode, col_submode, + $sql = "select col_primary_key, col_sat_name, col_time_on, col_call, col_band, col_gridsquare, col_dxcc, col_country, station_profile_name, col_lotw_qsl_rcvd, col_mode, col_submode, ( select group_concat(distinct gridsquare order by gridsquare separator ', ') from vuccgrids @@ -1970,6 +1970,7 @@ class Logbookadvanced_model extends CI_Model { 'mode' => isset($call->col_mode) ? $call->col_mode : '', 'submode' => isset($call->col_submode) ? $call->col_submode : '', 'band' => isset($call->col_band) ? $call->col_band : '', + 'sat_name' => isset($call->col_sat_name) ? $call->col_sat_name : '', 'lotw_qsl_rcvd' => isset($call->col_lotw_qsl_rcvd) ? $call->col_lotw_qsl_rcvd : '', 'station_profile' => $call->station_profile_name, 'existing_dxcc' => $call->col_country, @@ -1995,7 +1996,7 @@ class Logbookadvanced_model extends CI_Model { } function getQsos() { - $sql = 'select distinct col_country, col_call, col_dxcc, date(col_time_on) date, col_mode, col_submode, col_band, col_lotw_qsl_rcvd, station_profile.station_profile_name, col_primary_key + $sql = 'select distinct col_country, col_sat_name, col_call, col_dxcc, date(col_time_on) date, col_mode, col_submode, col_band, col_lotw_qsl_rcvd, station_profile.station_profile_name, col_primary_key from ' . $this->config->item('table_name') . ' join station_profile on ' . $this->config->item('table_name') . '.station_id = station_profile.station_id where station_profile.user_id = ?'; @@ -2105,7 +2106,7 @@ class Logbookadvanced_model extends CI_Model { * */ public function checkSingleIota() { - $sql = "select col_primary_key, col_time_on, col_call, col_band, col_gridsquare, col_dxcc, col_country, station_profile_name, col_lotw_qsl_rcvd, col_mode, col_submode, col_iota, iotadxcc.name as correctdxcc + $sql = "select col_primary_key, col_time_on, col_call, col_sat_name, col_band, col_gridsquare, col_dxcc, col_country, station_profile_name, col_lotw_qsl_rcvd, col_mode, col_submode, col_iota, iotadxcc.name as correctdxcc from " . $this->config->item('table_name') . " thcv join station_profile on thcv.station_id = station_profile.station_id join dxcc_entities on dxcc_entities.adif = thcv.COL_DXCC @@ -2152,7 +2153,7 @@ class Logbookadvanced_model extends CI_Model { // Build IN clause for SQL $adifListStr = implode(',', $adifList); - $sql = "SELECT thcv.col_primary_key, thcv.col_time_on, thcv.col_call, thcv.col_band, thcv.col_gridsquare, + $sql = "SELECT thcv.col_primary_key, thcv.col_sat_name, thcv.col_time_on, thcv.col_call, thcv.col_band, thcv.col_gridsquare, thcv.col_dxcc, thcv.col_country, station_profile.station_profile_name, thcv.col_lotw_qsl_rcvd, thcv.col_mode, thcv.col_submode, thcv.col_iota, ( diff --git a/application/views/logbookadvanced/checkresult.php b/application/views/logbookadvanced/checkresult.php index 83ea007e5..5638ff186 100644 --- a/application/views/logbookadvanced/checkresult.php +++ b/application/views/logbookadvanced/checkresult.php @@ -114,7 +114,7 @@ function check_dxcc($result, $custom_date_format) { ?>
' . htmlspecialchars($qso['callsign']) . ''; ?> - +
@@ -173,7 +173,7 @@ function check_incorrect_gridsquares($result, $custom_date_format) { ?> col_primary_key . ')">' . htmlspecialchars($qso->col_call) . ''; ?> col_time_on)); ?> - col_band); ?> + col_sat_name != null) { echo $qso->col_sat_name; } else { echo strtolower($qso->col_band); }; ?> col_submode ? $qso->col_submode : $qso->col_mode); ?>
col_lotw_qsl_rcvd == 'Y' ? __('Yes') : __('No'); ?>
station_profile_name; ?> @@ -400,7 +400,7 @@ function check_iota($result, $custom_date_format) { ?> col_primary_key . ')">' . htmlspecialchars($qso->col_call) . ''; ?> col_time_on)); ?> - col_band); ?> + col_sat_name != null) { echo $qso->col_sat_name; } else { echo strtolower($qso->col_band); }; ?> col_submode ? $qso->col_submode : $qso->col_mode); ?>
col_lotw_qsl_rcvd == 'Y' ? __('Yes') : __('No'); ?>
station_profile_name; ?> @@ -427,4 +427,4 @@ function check_iota($result, $custom_date_format) { ?>