From d56cb4b20a661e437dca12ec882718b6100d2ce3 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Sun, 19 Sep 2021 20:01:32 +0200 Subject: [PATCH] [QSO Edit] Fixed duplication of state in county when saving edited QSO. Fixes #1178 --- application/models/Logbook_model.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 8e4bb9b3..a471905a 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -484,6 +484,12 @@ class Logbook_model extends CI_Model { $srx_string = null; } + if (stristr($this->input->post('usa_county'), ',')) { + $uscounty = $this->input->post('usa_county'); + } else { + $uscounty = $this->input->post('usa_state') .",".$this->input->post('usa_county'); + } + $data = array( 'COL_TIME_ON' => $this->input->post('time_on'), 'COL_TIME_OFF' => $this->input->post('time_off'), @@ -526,14 +532,14 @@ class Logbook_model extends CI_Model { 'COL_FREQ_RX' => $this->parse_frequency($this->input->post('freq_display_rx')), 'COL_STX_STRING' => $this->input->post('stx_string'), 'COL_SRX_STRING' => $this->input->post('srx_string'), - 'COL_STX' => $stx_string, - 'COL_SRX' => $srx_string, - 'COL_CONTEST_ID' => $this->input->post('contest_name'), + 'COL_STX' => $stx_string, + 'COL_SRX' => $srx_string, + 'COL_CONTEST_ID' => $this->input->post('contest_name'), 'COL_QSL_VIA' => $this->input->post('qsl_via_callsign'), 'station_id' => $this->input->post('station_profile'), 'COL_OPERATOR' => $this->input->post('operator_callsign'), 'COL_STATE' =>$this->input->post('usa_state'), - 'COL_CNTY' =>$this->input->post('usa_state') .",".$this->input->post('usa_county'), + 'COL_CNTY' => $uscounty ); if ($this->exists_qrz_api_key($data['station_id'])) {