From 96d63f49aa959136cfef686ea2493cdc08b7f35b Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Sat, 3 Feb 2024 14:12:40 +0000 Subject: [PATCH] Cleaned up the code better for #2947 --- application/models/Logbook_model.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 48fefee7..8b1d06b3 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -294,11 +294,8 @@ class Logbook_model extends CI_Model $data['COL_STATION_CALLSIGN'] = strtoupper(trim($station['station_callsign'])); $data['COL_MY_DXCC'] = strtoupper(trim($station['station_dxcc'])); - if (isset($station['station_country'])) { - $data['COL_MY_COUNTRY'] = strtoupper(trim($station['station_country'])); - } else { - $data['COL_MY_COUNTRY'] = null; - } + $data['COL_MY_COUNTRY'] = $station['station_country'] == null ? '' : strtoupper(trim($station['station_country'])); + $data['COL_MY_CNTY'] = strtoupper(trim($station['station_cnty'])); $data['COL_MY_CQ_ZONE'] = strtoupper(trim($station['station_cq'])); $data['COL_MY_ITU_ZONE'] = strtoupper(trim($station['station_itu']));