[ADIF import] Skip QRZ Logbook upload when importing ADIF from import and LoTW

pull/778/head
Peter Goodhall 2020-12-26 11:34:14 +00:00 zatwierdzone przez GitHub
commit 8a2d62e50c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 17 dodań i 10 usunięć

Wyświetl plik

@ -221,7 +221,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'));
$this->input->post('skipDuplicate'), $this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), true);
};

Wyświetl plik

@ -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);
$this->logbook_model->import($record, $obj['station_profile_id'], NULL, NULL, NULL, NULL, false);
} else {
$this->logbook_model->import($record, 0, NULL, NULL, NULL, NULL);
$this->logbook_model->import($record, 0, NULL, NULL, NULL, NULL, false);
}
};

Wyświetl plik

@ -489,7 +489,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, NULL, NULL, NULL); // Create the Entry
$result = $this->logbook_model->import($record, $station_id, NULL, NULL, NULL, NULL, true); // Create the Entry
if ($result == "") {
$lotw_status = 'QSO imported';
} else {

Wyświetl plik

@ -211,7 +211,7 @@ class Logbook_model extends CI_Model {
$data['COL_LOTW_QSL_RCVD'] = 'N';
}
$this->add_qso($data);
$this->add_qso($data, $skipexport = false);
}
public function check_station($id){
@ -357,7 +357,7 @@ class Logbook_model extends CI_Model {
}
function add_qso($data) {
function add_qso($data, $skipexport = false) {
if ($data['COL_DXCC'] == "Not Found"){
$data['COL_DXCC'] = NULL;
@ -374,8 +374,8 @@ class Logbook_model extends CI_Model {
$result = $this->exists_qrz_api_key($data['station_id']);
// Push qso to qrz if apikey is set, and realtime upload is enabled
if (isset($result->qrzapikey) && $result->qrzrealtime == 1) {
// Push qso to qrz if apikey is set, and realtime upload is enabled, and we're not importing an adif-file
if (isset($result->qrzapikey) && $result->qrzrealtime == 1 && !$skipexport) {
$CI =& get_instance();
$CI->load->library('AdifHelper');
$qso = $this->get_qso($last_id)->result();
@ -1462,7 +1462,14 @@ class Logbook_model extends CI_Model {
return $this->db->get();
}
function import($record, $station_id = "0", $skipDuplicate, $markLotw, $dxccAdif, $markQrz) {
/*
* $skipDuplicate - used in ADIF import to skip duplicate checking 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 Cloudlog should try to guess
* $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, $markLotw, $dxccAdif, $markQrz, $skipexport = false) {
$CI =& get_instance();
$CI->load->library('frequency');
$my_error = "";
@ -1963,7 +1970,7 @@ class Logbook_model extends CI_Model {
}
// Save QSO
$this->add_qso($data);
$this->add_qso($data, $skipexport);
} else {
$my_error .= "Date/Time: ".$time_on." Callsign: ".$record['call']." Band: ".$band." Duplicate<br>";
}