[ADIF Import] Added option to always use login call as operator. Request by OE3IDE.

这个提交包含在:
Andreas 2021-05-01 19:52:13 +02:00
父节点 de5671ef57
当前提交 64827f4506
共有 5 个文件被更改,包括 57 次插入42 次删除

查看文件

@ -226,7 +226,7 @@ class adif extends CI_Controller {
$custom_errors .= $this->logbook_model->import($record, $this->input->post('station_profile'),
$this->input->post('skipDuplicate'), $this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), true);
$this->input->post('skipDuplicate'), $this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), true, $this->input->post('operatorName'));
};

查看文件

@ -429,9 +429,9 @@ class API extends CI_Controller {
if(isset($obj['station_profile_id'])) {
$this->logbook_model->import($record, $obj['station_profile_id'], NULL, NULL, NULL, NULL, false);
$this->logbook_model->import($record, $obj['station_profile_id'], NULL, NULL, NULL, NULL, false, false);
} else {
$this->logbook_model->import($record, 0, NULL, NULL, NULL, NULL, false);
$this->logbook_model->import($record, 0, NULL, NULL, NULL, NULL, false, false);
}
};

查看文件

@ -498,7 +498,7 @@ class Lotw extends CI_Controller {
$station_id = $this->logbook_model->find_correct_station_id($record['station_callsign'], $record['my_gridsquare']);
if ($station_id != NULL) {
$result = $this->logbook_model->import($record, $station_id, NULL, TRUE, NULL, NULL, true); // Create the Entry
$result = $this->logbook_model->import($record, $station_id, NULL, TRUE, NULL, NULL, true, false); // Create the Entry
if ($result == "") {
$lotw_status = 'QSO imported';
} else {

查看文件

@ -1502,7 +1502,7 @@ class Logbook_model extends CI_Model {
* $markQrz - used in ADIF import to mark QSOs as exported to QRZ 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, $markLotw = false, $dxccAdif = false, $markQrz = false, $skipexport = false) {
function import($record, $station_id = "0", $skipDuplicate = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $skipexport = false, $operatorName = false) {
$CI =& get_instance();
$CI->load->library('frequency');
$my_error = "";
@ -1805,6 +1805,12 @@ class Logbook_model extends CI_Model {
}
}
if ($operatorName != false) {
$operatorName = $this->session->userdata('user_callsign');
} else {
$operatorName = (!empty($record['operator'])) ? $record['operator'] : '';
}
// If user checked to mark QSOs as uploaded to QRZ Logbook, or else we try to find info in ADIF import.
if ($markQrz != null) {
$input_qrzcom_qso_upload_status = 'Y';
@ -1918,7 +1924,7 @@ class Logbook_model extends CI_Model {
'COL_NOTES_INTL' => (!empty($record['notes_intl'])) ? $record['notes_intl'] : '',
'COL_NR_BURSTS' => (!empty($record['nr_bursts'])) ? $record['nr_bursts'] : null,
'COL_NR_PINGS' => (!empty($record['nr_pings'])) ? $record['nr_pings'] : null,
'COL_OPERATOR' => (!empty($record['operator'])) ? $record['operator'] : '',
'COL_OPERATOR' => $operatorName,
'COL_OWNER_CALLSIGN' => (!empty($record['owner_callsign'])) ? $record['owner_callsign'] : '',
'COL_PFX' => (!empty($record['pfx'])) ? $record['pfx'] : '',
'COL_PRECEDENCE' => (!empty($record['precedence'])) ? $record['precedence'] : '',

查看文件

@ -82,6 +82,15 @@
</div>
</div>
<div class="form-group row">
<div class="col-md-10">
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="operatorName" value="1" id="operatorName">
<label class="form-check-label" for="operatorName">Always use login-callsign as operator-name on import</label>
</div>
</div>
</div>
<button type="submit" class="btn-sm btn-primary mb-2" value="Upload">Upload</button>
</form>
</div>