From 8b4957e59329bcb0c1aab9cd221f9adb1d3573a5 Mon Sep 17 00:00:00 2001 From: int2001 Date: Fri, 7 Mar 2025 06:09:35 +0000 Subject: [PATCH 1/4] Ignore country-column since dxcc is joined --- application/models/Timeline_model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/models/Timeline_model.php b/application/models/Timeline_model.php index 94020db1a..4c67a7a78 100644 --- a/application/models/Timeline_model.php +++ b/application/models/Timeline_model.php @@ -63,11 +63,11 @@ class Timeline_model extends CI_Model { $sql .= $this->addQslToQuery($qsl, $lotw, $eqsl, $clublog, $qrz); - $sql .= " group by col_dxcc, col_country + $sql .= " group by col_dxcc order by date desc"; $query = $this->db->query($sql, $binding); - + log_message("Error",$this->db->last_query()); return $query->result(); } From 69cdbe6a4f14f7c26de216af32056bb0f215e4dc Mon Sep 17 00:00:00 2001 From: int2001 Date: Fri, 7 Mar 2025 06:36:56 +0000 Subject: [PATCH 2/4] When updating DXCC out of LoTW-cfm update country as well --- application/controllers/Lotw.php | 8 +++++++- application/models/Logbook_model.php | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index 19bb31586..302278e56 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -592,7 +592,13 @@ class Lotw extends CI_Controller { $dxcc = ""; } - $lotw_status = $this->logbook_model->lotw_update($time_on, $record['call'], $record['band'], $qsl_date, $record['qsl_rcvd'], $state, $qsl_gridsquare, $qsl_vucc_grids, $iota, $cnty, $cqz, $ituz, $record['station_callsign'],$qso_id4lotw, $station_ids, $dxcc, $ant_path); + if (isset($record['country'])) { + $country = $record['country']; + } else { + $country = ""; + } + + $lotw_status = $this->logbook_model->lotw_update($time_on, $record['call'], $record['band'], $qsl_date, $record['qsl_rcvd'], $state, $qsl_gridsquare, $qsl_vucc_grids, $iota, $cnty, $cqz, $ituz, $record['station_callsign'],$qso_id4lotw, $station_ids, $dxcc, $country, $ant_path); $table .= ""; $table .= "".$record['station_callsign'].""; diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 306fd0750..d2c3049f2 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -3727,7 +3727,7 @@ class Logbook_model extends CI_Model { } } - function lotw_update($datetime, $callsign, $band, $qsl_date, $qsl_status, $state, $qsl_gridsquare, $qsl_vucc_grids, $iota, $cnty, $cqz, $ituz, $station_callsign, $qsoid, $station_ids, $dxcc = null, $ant_path = null) { + function lotw_update($datetime, $callsign, $band, $qsl_date, $qsl_status, $state, $qsl_gridsquare, $qsl_vucc_grids, $iota, $cnty, $cqz, $ituz, $station_callsign, $qsoid, $station_ids, $country = null, $dxcc = null, $ant_path = null) { $data = array( 'COL_LOTW_QSLRDATE' => $qsl_date, @@ -3753,6 +3753,10 @@ class Logbook_model extends CI_Model { $data['COL_DXCC'] = $dxcc; } + if (($country ?? '') != '') { + $data['COL_COUNTRY'] = $country; + } + if ($ituz != "") { $data['COL_ITUZ'] = $ituz; } From b70a1e245d6099acba838fcc17bbd7553eeba3d8 Mon Sep 17 00:00:00 2001 From: int2001 Date: Fri, 7 Mar 2025 06:53:46 +0000 Subject: [PATCH 3/4] Remove Dbg --- application/models/Timeline_model.php | 1 - 1 file changed, 1 deletion(-) diff --git a/application/models/Timeline_model.php b/application/models/Timeline_model.php index 4c67a7a78..a36f09633 100644 --- a/application/models/Timeline_model.php +++ b/application/models/Timeline_model.php @@ -67,7 +67,6 @@ class Timeline_model extends CI_Model { order by date desc"; $query = $this->db->query($sql, $binding); - log_message("Error",$this->db->last_query()); return $query->result(); } From 64d17b4331fdcfb6b0b6a717b2978d49bdc3deb6 Mon Sep 17 00:00:00 2001 From: "Joerg (DJ7NT)" Date: Fri, 7 Mar 2025 08:15:55 +0100 Subject: [PATCH 4/4] order it the correct way omg. should drink more coffee. tnx! Co-authored-by: Florian (DF2ET) --- application/models/Logbook_model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index d2c3049f2..e26179f79 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -3727,7 +3727,7 @@ class Logbook_model extends CI_Model { } } - function lotw_update($datetime, $callsign, $band, $qsl_date, $qsl_status, $state, $qsl_gridsquare, $qsl_vucc_grids, $iota, $cnty, $cqz, $ituz, $station_callsign, $qsoid, $station_ids, $country = null, $dxcc = null, $ant_path = null) { + function lotw_update($datetime, $callsign, $band, $qsl_date, $qsl_status, $state, $qsl_gridsquare, $qsl_vucc_grids, $iota, $cnty, $cqz, $ituz, $station_callsign, $qsoid, $station_ids, $dxcc = null, $country = null, $ant_path = null) { $data = array( 'COL_LOTW_QSLRDATE' => $qsl_date,