From 7e8be5e266397d49c6189a4eff008e1ce962c274 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Sat, 26 Dec 2020 12:08:43 +0000 Subject: [PATCH] [LoTW][Upload] Make sure Station Profile and Cert DXCCs match --- application/controllers/Lotw.php | 2 +- application/models/LotwCert.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index e8ec6bfdb..41e25eb6c 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -209,7 +209,7 @@ class Lotw extends CI_Controller { // Get Certificate Data $this->load->model('LotwCert'); $data['station_profile'] = $station_profile; - $data['lotw_cert_info'] = $this->LotwCert->lotw_cert_details($station_profile->station_callsign); + $data['lotw_cert_info'] = $this->LotwCert->lotw_cert_details($station_profile->station_callsign, $station_profile->station_country); // If Station Profile has no LOTW Cert continue on. if(!isset($data['lotw_cert_info']->cert_dxcc)) { diff --git a/application/models/LotwCert.php b/application/models/LotwCert.php index 0597bac91..ba5da91a6 100644 --- a/application/models/LotwCert.php +++ b/application/models/LotwCert.php @@ -25,7 +25,8 @@ class LotwCert extends CI_Model { return $query; } - function lotw_cert_details($callsign) { + function lotw_cert_details($callsign, $dxcc) { + $this->db->where('cert_dxcc', $dxcc); $this->db->where('callsign', $callsign); $query = $this->db->get('lotw_certs');