From c4c291ccabb6e892155a9770afa5a76ead64164f Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Tue, 15 Mar 2022 13:19:00 +0000 Subject: [PATCH] [LoTW][Upload] Remaps CA Prov QC to PQ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to @ve1cwj for reporting issue that LoTW expects PQ rather than QC as the CA Prov 👎 --- application/controllers/Lotw.php | 10 ++++++++++ .../views/lotw_views/adif_views/adif_export.php | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index f0898686..d7d157b4 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -912,6 +912,16 @@ class Lotw extends CI_Controller { return array_search(strtoupper($satname),$arr,true); } + 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; ?>