mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Use DXCC ID from LotW cert for uploads
This commit is contained in:
@@ -225,10 +225,10 @@ 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, $station_profile->station_country);
|
||||
$data['lotw_cert_info'] = $this->LotwCert->lotw_cert_details($station_profile->station_callsign, $station_profile->station_dxcc);
|
||||
|
||||
// If Station Profile has no LOTW Cert continue on.
|
||||
if(!isset($data['lotw_cert_info']->cert_dxcc)) {
|
||||
if(!isset($data['lotw_cert_info']->cert_dxcc_id)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -244,9 +244,6 @@ class Lotw extends CI_Controller {
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->load->model('Dxcc');
|
||||
$data['station_profile_dxcc'] = $this->Dxcc->lookup_country($data['lotw_cert_info']->cert_dxcc);
|
||||
|
||||
// Get QSOs
|
||||
|
||||
$this->load->model('Logbook_model');
|
||||
|
||||
@@ -22,7 +22,7 @@ class LotwCert extends CI_Model {
|
||||
}
|
||||
|
||||
function lotw_cert_details($callsign, $dxcc) {
|
||||
$this->db->where('cert_dxcc', $dxcc);
|
||||
$this->db->where('cert_dxcc_id', $dxcc);
|
||||
$this->db->where('callsign', $callsign);
|
||||
$query = $this->db->get('lotw_certs');
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ $cert2 = str_replace("-----END CERTIFICATE-----", "", $cert1);
|
||||
<CERT_UID:1>1
|
||||
<CALL:<?php echo strlen($lotw_cert_info->callsign); ?>><?php echo $lotw_cert_info->callsign; ?>
|
||||
|
||||
<DXCC:<?php echo strlen($station_profile_dxcc->adif); ?>><?php echo $station_profile_dxcc->adif; ?>
|
||||
<DXCC:<?php echo strlen($lotw_cert_info->cert_dxcc_id); ?>><?php echo $lotw_cert_info->cert_dxcc_d; ?>
|
||||
|
||||
<?php if(isset($station_profile->station_gridsquare)) { ?><GRIDSQUARE:<?php echo strlen($station_profile->station_gridsquare); ?>><?php echo $station_profile->station_gridsquare; ?><?php } ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user