mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
add info about imported contests during adif import
This commit is contained in:
@@ -225,10 +225,24 @@ class adif extends CI_Controller {
|
||||
$this->adif_parser->initialize();
|
||||
$custom_errors = "";
|
||||
$alladif=[];
|
||||
$contest_qso_infos = [];
|
||||
while($record = $this->adif_parser->get_record()) {
|
||||
|
||||
//overwrite the contest id if user chose a contest in UI
|
||||
if ($contest != '') {
|
||||
$record['contest_id']=$contest;
|
||||
$record['contest_id'] = $contest;
|
||||
}
|
||||
|
||||
//check if contest_id exists in record and extract all found contest_ids
|
||||
if(array_key_exists('contest_id', $record)){
|
||||
$contest_id = $record['contest_id'];
|
||||
if(array_key_exists($contest_id, $contest_qso_infos)){
|
||||
$contest_qso_infos[$contest_id] += 1;
|
||||
}else{
|
||||
$contest_qso_infos[$contest_id] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if(count($record) == 0) {
|
||||
break;
|
||||
};
|
||||
@@ -265,6 +279,7 @@ class adif extends CI_Controller {
|
||||
log_message("Error","ADIF End");
|
||||
$data['adif_errors'] = $custom_errors;
|
||||
$data['skip_dupes'] = $this->input->post('skipDuplicate');
|
||||
$data['imported_contests'] = $contest_qso_infos;
|
||||
|
||||
$data['page_title'] = __("ADIF Imported");
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
|
||||
Reference in New Issue
Block a user