Merge pull request #2297 from int2001/adif_import_call

Fixes #2295 // Fill station_callsign when provided empty by adif
pull/2389/head
Peter Goodhall 2023-07-15 14:43:14 +01:00 zatwierdzone przez GitHub
commit 8e28c1d48f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -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');