From dc01bee3c15643b0acbdfd1c06946aba8c4f5409 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Sat, 15 Jul 2023 14:43:14 +0100 Subject: [PATCH] Merge pull request #2297 from int2001/adif_import_call Fixes #2295 // Fill station_callsign when provided empty by adif --- application/models/Logbook_model.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index c5f43dd56..cec2811ff 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -2749,9 +2749,13 @@ class Logbook_model extends CI_Model { $station_profile=$CI->Stations->profile_clean($station_id); $station_profile_call=$station_profile->station_callsign; -/* if (($station_id != 0) && ($record['station_callsign'] != $station_profile_call)) { // Check if station_call from import matches profile ONLY when submitting via GUI. - return "Wrong station_callsign ".$record['station_callsign']." while importing QSO with ".$record['call']." for ".$station_profile_call; - } */ + if (($station_id !=0 ) && (!(isset($record['station_callsign'])))) { + $record['station_callsign']=$station_profile_call; + } + + if (($station_id != 0) && ($record['station_callsign'] != $station_profile_call)) { // Check if station_call from import matches profile ONLY when submitting via GUI. + return "Wrong station_callsign ".$record['station_callsign']." while importing QSO with ".$record['call']." for ".$station_profile_call." : SKIPPED"; + } $CI =& get_instance(); $CI->load->library('frequency');