Remove slashed zeros on ADIF import

This commit is contained in:
phl0
2025-11-14 11:12:35 +01:00
parent 855288d0dc
commit 17c62c3ea8

View File

@@ -225,6 +225,18 @@ class adif extends CI_Controller {
$contest_qso_infos = [];
while($record = $this->adif_parser->get_record()) {
// Handle slashed zeros
$record['call'] = str_replace('Ø', "0", $record['call']);
if (($record['operator'] ?? '') != '') {
$record['operator'] = str_replace('Ø', "0", $record['operator']);
}
if (($record['station_callsign'] ?? '') != '') {
$record['station_callsign'] = str_replace('Ø', "0", $record['station_callsign']);
}
if (($record['owner_callsign'] ?? '') != '') {
$record['owner_callsign'] = str_replace('Ø', "0", $record['owner_callsign']);
}
//overwrite the contest id if user chose a contest in UI
if ($contest != '') {
$record['contest_id'] = $contest;