From 4a847de5a62afecd661611b1b8f566f82a720baf Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Tue, 15 Mar 2022 13:14:03 +0000 Subject: [PATCH] [LoTW][Upload] Remaps CA Prov QC to PQ Thanks to @ve1cwj for reporting issue that LoTW expects PQ rather than QC as the CA Prov :thumbsdown: --- application/controllers/Lotw.php | 17 +++++++++++++++++ .../views/lotw_views/adif_views/adif_export.php | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index ba21487d..6d4339f9 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -921,6 +921,23 @@ class Lotw extends CI_Controller { return array_search(strtoupper($satname),$arr,true); } + /* + | Function: lotw_satellite_map + | Requires: OSCAR Satellite name $satname + | + | Outputs if LOTW uses a different satellite name + | + */ + function lotw_ca_province_map($ca_prov) { + switch ($ca_prov): + case "QC": + return "PQ"; + break; + default: + return $ca_prov; + endswitch; + } + /* | Function: mode_map | Requires: mode as $mode, submode as $submode diff --git a/application/views/lotw_views/adif_views/adif_export.php b/application/views/lotw_views/adif_views/adif_export.php index 4c36b0e6..75619b18 100644 --- a/application/views/lotw_views/adif_views/adif_export.php +++ b/application/views/lotw_views/adif_views/adif_export.php @@ -27,7 +27,7 @@ $cert2 = str_replace("-----END CERTIFICATE-----", "", $cert1); station_iota)) { ?>station_iota); ?>>station_iota; ?> -state != "" && $station_profile->station_country == "CANADA") { ?>state); ?>>state; ?> +state != "" && $station_profile->station_country == "CANADA") { ?>lotw_ca_province_map($station_profile->state)); ?>>lotw_ca_province_map($station_profile->state); ?> state != "" && $station_profile->station_country == "UNITED STATES OF AMERICA") { ?>state); ?>>state; ?>