mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Merge pull request #2390 from int2001/dupecheck_calrify
Clarify DupeCheck internally
This commit is contained in:
@@ -254,7 +254,12 @@ class adif extends CI_Controller {
|
||||
};
|
||||
$record=''; // free memory
|
||||
try {
|
||||
$custom_errors = $this->logbook_model->import_bulk($alladif, $this->input->post('station_profile', TRUE), $this->input->post('skipDuplicate'), $this->input->post('markClublog'),$this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), $this->input->post('markEqsl'), $this->input->post('markHrd'), $this->input->post('markDcl'), true, $this->input->post('operatorName') ?? false, false, $this->input->post('skipStationCheck'));
|
||||
if (($this->input->post('skipDuplicate',true) ?? '') == '1') { // Reverse Logic. View states: "Import Dupes", while Flag is called skipDuplicates
|
||||
$skipDups=false; // Box ticked? Means: Import Dupes
|
||||
} else {
|
||||
$skipDups=true; // Box not ticked? Means: Skip Dupes, don't import them
|
||||
}
|
||||
$custom_errors = $this->logbook_model->import_bulk($alladif, $this->input->post('station_profile', TRUE), $skipDups, $this->input->post('markClublog'),$this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), $this->input->post('markEqsl'), $this->input->post('markHrd'), $this->input->post('markDcl'), true, $this->input->post('operatorName') ?? false, false, $this->input->post('skipStationCheck'));
|
||||
} catch (Exception $e) {
|
||||
log_message('error', 'Import error: '.$e->getMessage());
|
||||
$data['page_title'] = __("ADIF Import failed!");
|
||||
|
||||
@@ -277,7 +277,7 @@ class API extends CI_Controller {
|
||||
};
|
||||
$record=''; // free memory
|
||||
gc_collect_cycles();
|
||||
$result = $this->logbook_model->import_bulk($alladif, $obj['station_profile_id'], false, false, false, false, false, false, false, false, true, false, true, false);
|
||||
$result = $this->logbook_model->import_bulk($alladif, $obj['station_profile_id'], true, false, false, false, false, false, false, false, true, false, true, false);
|
||||
$custom_errors = $result['errormessage'];
|
||||
if ($custom_errors) {
|
||||
$adif_errors++;
|
||||
|
||||
@@ -3972,7 +3972,7 @@ class Logbook_model extends CI_Model {
|
||||
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, $markEqsl = false, $markHrd = false, $markDcl = false, $skipexport = false, $operatorName = false, $apicall = false, $skipStationCheck = false) {
|
||||
function import_bulk($records, $station_id = "0", $skipDuplicate = true, $markClublog = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $markEqsl = false, $markHrd = false, $markDcl = false, $skipexport = false, $operatorName = false, $apicall = false, $skipStationCheck = false) {
|
||||
$this->load->model('user_model');
|
||||
$custom_errors['errormessage'] = '';
|
||||
$a_qsos = [];
|
||||
@@ -4033,14 +4033,14 @@ class Logbook_model extends CI_Model {
|
||||
|
||||
|
||||
/*
|
||||
* $skipDuplicate - used in ADIF import to skip duplicate checking when importing QSOs
|
||||
* $skipDuplicate - used in ADIF import to skip duplicates when importing QSOs
|
||||
* $markLoTW - used in ADIF import to mark QSOs as exported to LoTW when importing QSOs
|
||||
* $dxccAdif - used in ADIF import to determine if DXCC From ADIF is used, or if Wavelog should try to guess
|
||||
* $markQrz - used in ADIF import to mark QSOs as exported to QRZ Logbook when importing QSOs
|
||||
* $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, $markEqsl = false, $markHrd = false, $markDcl = false, $skipexport = false, $operatorName = false, $apicall = false, $skipStationCheck = false, $batchmode = false, $station_id_ok = false, $station_profile = null, $station_qslmsg = null) {
|
||||
function import($record, $station_id = "0", $skipDuplicate = true, $markClublog = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $markEqsl = false, $markHrd = false, $markDcl = false, $skipexport = false, $operatorName = false, $apicall = false, $skipStationCheck = false, $batchmode = false, $station_id_ok = false, $station_profile = null, $station_qslmsg = null) {
|
||||
// be sure that station belongs to user
|
||||
$this->load->model('stations');
|
||||
if ($station_id_ok == false) {
|
||||
@@ -4167,7 +4167,7 @@ class Logbook_model extends CI_Model {
|
||||
|
||||
|
||||
// Check if QSO is already in the database
|
||||
if ($skipDuplicate != NULL) {
|
||||
if (!$skipDuplicate) {
|
||||
$skip = false;
|
||||
} else {
|
||||
if (isset($record['call'])) {
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
<input class="form-check-input" type="checkbox" name="skipDuplicate" value="1" id="skipDuplicate">
|
||||
<label class="form-check-label" for="skipDuplicate"><?= __("Import duplicate QSOs") ?></label>
|
||||
</div>
|
||||
<div class="small form-text text-muted"><?= __("Select if want to import QSOs, even if they already exist.") ?></div>
|
||||
<div class="small form-text text-muted"><?= __("Select if QSOs shall be imported, even if they already exist.") ?></div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-check-inline">
|
||||
|
||||
Reference in New Issue
Block a user