diff --git a/application/controllers/Adif.php b/application/controllers/Adif.php index 4b83bc15e..e6ff7355d 100644 --- a/application/controllers/Adif.php +++ b/application/controllers/Adif.php @@ -233,7 +233,7 @@ class adif extends CI_Controller { array_push($alladif,$record); }; $record=''; // free memory - $custom_errors = $this->logbook_model->import_bulk($alladif, $this->input->post('station_profile'), $this->input->post('skipDuplicate'), $this->input->post('markClublog'),$this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), $this->input->post('markHrd'), true, $this->input->post('operatorName'), false, $this->input->post('skipStationCheck')); + $custom_errors = $this->logbook_model->import_bulk($alladif, $this->input->post('station_profile'), $this->input->post('skipDuplicate'), $this->input->post('markClublog'),$this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), $this->input->post('markHrd'), true, $this->input->post('operatorName'), false, $this->input->post('skipStationCheck'), $this->input->post('operatorFirstnameImport')); } else { // Failure, if no ADIF inside ZIP $data['max_upload'] = ini_get('upload_max_filesize'); $this->load->view('interface_assets/header', $data); diff --git a/application/controllers/Operator.php b/application/controllers/Operator.php index 68591d570..b522a04a8 100644 --- a/application/controllers/Operator.php +++ b/application/controllers/Operator.php @@ -14,7 +14,9 @@ class Operator extends CI_Controller { public function saveOperator() { $operator = ['operator_callsign' => $this->security->xss_clean(strtoupper($this->input->post('operator_callsign')))]; + $op_firstname = ['operator_firstname' => $this->security->xss_clean($this->input->post('operator_firstname'))]; $this->session->set_userdata($operator); + $this->session->set_userdata($op_firstname); } } diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index d64701ae1..7684aa01c 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -263,7 +263,7 @@ class Logbook_model extends CI_Model { 'COL_QSL_SENT_VIA' => $this->input->post('qsl_sent_method'), 'COL_QSL_RCVD_VIA' => $this->input->post('qsl_rcvd_method'), 'COL_QSL_VIA' => $this->input->post('qsl_via'), - 'COL_QSLMSG' => $this->input->post('qslmsg'), + 'COL_QSLMSG' => $this->session->userdata('operator_firstname') ?? '', 'COL_OPERATOR' => $this->input->post('operator_callsign') ?? $this->session->userdata('operator_callsign'), 'COL_QTH' => $this->input->post('qth'), 'COL_PROP_MODE' => $prop_mode, @@ -3405,7 +3405,7 @@ function lotw_last_qsl_date($user_id) { return '1900-01-01 00:00:00.000'; } - function import_bulk($records, $station_id = "0", $skipDuplicate = false, $markClublog = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $markHrd = false,$skipexport = false, $operatorName = false, $apicall = false, $skipStationCheck = false) { + function import_bulk($records, $station_id = "0", $skipDuplicate = false, $markClublog = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $markHrd = false,$skipexport = false, $operatorName = false, $apicall = false, $skipStationCheck = false, $operatorFirstname = NULL) { $custom_errors=''; $a_qsos=[]; if (!$this->stations->check_station_is_accessible($station_id) && $apicall == false ) { @@ -3415,7 +3415,7 @@ function lotw_last_qsl_date($user_id) { $station_profile=$this->stations->profile_clean($station_id); foreach ($records as $record) { - $one_error = $this->logbook_model->import($record, $station_id, $skipDuplicate, $markClublog, $markLotw,$dxccAdif, $markQrz, $markHrd, $skipexport, $operatorName, $apicall, $skipStationCheck, true, $station_id_ok, $station_profile); + $one_error = $this->logbook_model->import($record, $station_id, $skipDuplicate, $markClublog, $markLotw,$dxccAdif, $markQrz, $markHrd, $skipexport, $operatorName, $apicall, $skipStationCheck, true, $station_id_ok, $station_profile, $operatorFirstname); if ($one_error['error'] ?? '' != '') { $custom_errors.=$one_error['error']."
"; } else { @@ -3437,7 +3437,7 @@ function lotw_last_qsl_date($user_id) { * $markHrd - used in ADIF import to mark QSOs as exported to HRDLog.net Logbook when importing QSOs * $skipexport - used in ADIF import to skip the realtime upload to QRZ Logbook when importing QSOs from ADIF */ - function import($record, $station_id = "0", $skipDuplicate = false, $markClublog = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $markHrd = false,$skipexport = false, $operatorName = false, $apicall = false, $skipStationCheck = false, $batchmode = false, $station_id_ok = false, $station_profile = null) { + function import($record, $station_id = "0", $skipDuplicate = false, $markClublog = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $markHrd = false,$skipexport = false, $operatorName = false, $apicall = false, $skipStationCheck = false, $batchmode = false, $station_id_ok = false, $station_profile = null, $operatorFirstname = null) { // be sure that station belongs to user $this->load->model('stations'); if ($station_id_ok == false) { @@ -3991,7 +3991,7 @@ function lotw_last_qsl_date($user_id) { 'COL_QSL_SENT' => $input_qsl_sent, 'COL_QSL_SENT_VIA' => $input_qsl_sent_via, 'COL_QSL_VIA' => (!empty($record['qsl_via'])) ? $record['qsl_via'] : '', - 'COL_QSLMSG' => (!empty($record['qslmsg'])) ? $record['qslmsg'] : '', + 'COL_QSLMSG' => $operatorFirstname ?? '', 'COL_QSLRDATE' => $input_qslrdate, 'COL_QSLSDATE' => $input_qslsdate, 'COL_QSO_COMPLETE' => (!empty($record['qso_complete'])) ? $record['qso_complete'] : '', diff --git a/application/models/User_model.php b/application/models/User_model.php index 4e3f0af46..5b75a4526 100644 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -416,6 +416,7 @@ class User_Model extends CI_Model { 'user_type' => $u->row()->user_type, 'user_callsign' => $u->row()->user_callsign, 'operator_callsign' => ((($this->session->userdata('operator_callsign') ?? '') == '') ? $u->row()->user_callsign : $this->session->userdata('operator_callsign')), + 'operator_firstname' => $this->session->userdata('operator_firstname') ?? '', 'user_locator' => $u->row()->user_locator, 'user_lotw_name' => $u->row()->user_lotw_name, 'user_clublog_name' => $u->row()->user_clublog_name ?? '', diff --git a/application/views/adif/import.php b/application/views/adif/import.php index 6d55e66bd..406b2e265 100644 --- a/application/views/adif/import.php +++ b/application/views/adif/import.php @@ -74,6 +74,8 @@ echo ''; } ?> + + diff --git a/application/views/operator/index.php b/application/views/operator/index.php index f5e66398b..bd53e336b 100644 --- a/application/views/operator/index.php +++ b/application/views/operator/index.php @@ -15,6 +15,9 @@
+
+

Dein Vorname:

+ diff --git a/assets/js/sections/operator.js b/assets/js/sections/operator.js index fa569dbe1..d2abe832e 100644 --- a/assets/js/sections/operator.js +++ b/assets/js/sections/operator.js @@ -33,6 +33,7 @@ function closeOperatorDialog() { function saveOperator() { var operatorInput = $("#operator_callsign"); + var operatorFirstname = $("#operator_firstname").val(); var operatorCallsign = operatorInput.val(); if (operatorCallsign != "" && operatorCallsign != sc_account_call) { @@ -42,6 +43,7 @@ function saveOperator() { type: "post", data: { operator_callsign: operatorCallsign, + operator_firstname: operatorFirstname }, }); closeOperatorDialog();