From bae5a466db82b5e23ea981bb5b682ffcd91c6880 Mon Sep 17 00:00:00 2001 From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com> Date: Mon, 2 Mar 2026 11:48:03 +0100 Subject: [PATCH] Fix sat filtering --- application/models/Dxcc.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/application/models/Dxcc.php b/application/models/Dxcc.php index b127a520a..2ec29e6da 100644 --- a/application/models/Dxcc.php +++ b/application/models/Dxcc.php @@ -195,25 +195,25 @@ class DXCC extends CI_Model { $totalWorkedDxccs = []; $totalConfirmedDxccs = []; foreach ($workedDxccs as $band => $dxccs) { - // Skip SAT for totals - if ($band === 'SAT') { - continue; - } foreach ($dxccs as $dxcc => $true) { if (!isset($totalWorkedDxccs[$dxcc])) { $totalWorkedDxccs[$dxcc] = true; + if ($band === 'SAT') { + continue; + } + $totalWorkedDxccsExSat[$dxcc] = true; $summary['worked']['Total']++; } } } foreach ($confirmedDxccs as $band => $dxccs) { - // Skip SAT for totals - if ($band === 'SAT') { - continue; - } foreach ($dxccs as $dxcc => $true) { if (!isset($totalConfirmedDxccs[$dxcc])) { $totalConfirmedDxccs[$dxcc] = true; + if ($band === 'SAT') { + continue; + } + $totalConfirmedDxccsExSat[$dxcc] = true; // For calculating total worked excluding SAT $summary['confirmed']['Total']++; } } @@ -255,9 +255,9 @@ class DXCC extends CI_Model { } } else { foreach ($dxccMatrix as $dxcc => $data) { - if (isset($totalConfirmedDxccs[$dxcc])) { + if (isset($totalConfirmedDxccsExSat[$dxcc])) { $mapDxccs[$dxcc] = 'C'; // Confirmed - } elseif (isset($totalWorkedDxccs[$dxcc])) { + } elseif (isset($totalWorkedDxccsExSat[$dxcc])) { $mapDxccs[$dxcc] = 'W'; // Worked but not confirmed } else { $mapDxccs[$dxcc] = '-'; // Not worked