From e59d31b1c7632507eed28c5afa8455410d480c2a Mon Sep 17 00:00:00 2001 From: Thomas Werzmirzowsky Date: Sun, 12 Jun 2022 10:37:14 +0200 Subject: [PATCH] give dxcc higher priority when doing adif import added ucwords for country to edit qso to be consistent with adif import and create --- application/models/Logbook_model.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 9632051d..a621dc06 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -558,7 +558,7 @@ class Logbook_model extends CI_Model { $entity = $this->get_entity($this->input->post('dxcc_id')); $stationId = $this->input->post('station_profile'); - $country = $entity['name']; + $country = ucwords(strtolower($entity['name'])); // be sure that station belongs to user $CI =& get_instance(); @@ -2228,12 +2228,11 @@ class Logbook_model extends CI_Model { } // Store or find country name - if(isset($record['country'])) { + // dxcc has higher priority to be consistent with qso create and edit + if (isset($dxcc[1])) { + $country = ucwords(strtolower($dxcc[1])); + } else if (isset($record['country'])) { $country = $record['country']; - } else { - if (isset($dxcc[1])) { - $country = ucwords(strtolower($dxcc[1])); - } } // RST recevied