mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Fix sat filtering
This commit is contained in:
@@ -195,25 +195,25 @@ class DXCC extends CI_Model {
|
|||||||
$totalWorkedDxccs = [];
|
$totalWorkedDxccs = [];
|
||||||
$totalConfirmedDxccs = [];
|
$totalConfirmedDxccs = [];
|
||||||
foreach ($workedDxccs as $band => $dxccs) {
|
foreach ($workedDxccs as $band => $dxccs) {
|
||||||
// Skip SAT for totals
|
|
||||||
if ($band === 'SAT') {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
foreach ($dxccs as $dxcc => $true) {
|
foreach ($dxccs as $dxcc => $true) {
|
||||||
if (!isset($totalWorkedDxccs[$dxcc])) {
|
if (!isset($totalWorkedDxccs[$dxcc])) {
|
||||||
$totalWorkedDxccs[$dxcc] = true;
|
$totalWorkedDxccs[$dxcc] = true;
|
||||||
|
if ($band === 'SAT') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$totalWorkedDxccsExSat[$dxcc] = true;
|
||||||
$summary['worked']['Total']++;
|
$summary['worked']['Total']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach ($confirmedDxccs as $band => $dxccs) {
|
foreach ($confirmedDxccs as $band => $dxccs) {
|
||||||
// Skip SAT for totals
|
|
||||||
if ($band === 'SAT') {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
foreach ($dxccs as $dxcc => $true) {
|
foreach ($dxccs as $dxcc => $true) {
|
||||||
if (!isset($totalConfirmedDxccs[$dxcc])) {
|
if (!isset($totalConfirmedDxccs[$dxcc])) {
|
||||||
$totalConfirmedDxccs[$dxcc] = true;
|
$totalConfirmedDxccs[$dxcc] = true;
|
||||||
|
if ($band === 'SAT') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$totalConfirmedDxccsExSat[$dxcc] = true; // For calculating total worked excluding SAT
|
||||||
$summary['confirmed']['Total']++;
|
$summary['confirmed']['Total']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -255,9 +255,9 @@ class DXCC extends CI_Model {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
foreach ($dxccMatrix as $dxcc => $data) {
|
foreach ($dxccMatrix as $dxcc => $data) {
|
||||||
if (isset($totalConfirmedDxccs[$dxcc])) {
|
if (isset($totalConfirmedDxccsExSat[$dxcc])) {
|
||||||
$mapDxccs[$dxcc] = 'C'; // Confirmed
|
$mapDxccs[$dxcc] = 'C'; // Confirmed
|
||||||
} elseif (isset($totalWorkedDxccs[$dxcc])) {
|
} elseif (isset($totalWorkedDxccsExSat[$dxcc])) {
|
||||||
$mapDxccs[$dxcc] = 'W'; // Worked but not confirmed
|
$mapDxccs[$dxcc] = 'W'; // Worked but not confirmed
|
||||||
} else {
|
} else {
|
||||||
$mapDxccs[$dxcc] = '-'; // Not worked
|
$mapDxccs[$dxcc] = '-'; // Not worked
|
||||||
|
|||||||
Reference in New Issue
Block a user