mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Take care of prop_mode if given by 3rd party
This commit is contained in:
@@ -527,7 +527,12 @@ class Lotw extends CI_Controller {
|
||||
$record['qsl_rcvd'] = $config['lotw_rcvd_mark'];
|
||||
}
|
||||
|
||||
$status = $this->logbook_model->import_check($time_on, $record['call'], $record['band'], $record['mode'], $record['station_callsign'], $station_ids);
|
||||
// Prop-Mode not given? Create array-key andfill with null
|
||||
if (!(array_key_exists('prop_mode', $record))) {
|
||||
$record['prop_mode']=null;
|
||||
}
|
||||
|
||||
$status = $this->logbook_model->import_check($time_on, $record['call'], $record['band'], $record['mode'], $record['prop_mode'],$record['station_callsign'], $station_ids);
|
||||
|
||||
if($status[0] == "Found") {
|
||||
$qso_id4lotw=$status[1];
|
||||
|
||||
@@ -450,10 +450,15 @@ class Qrz extends CI_Controller {
|
||||
$record['qsl_rcvd'] = $config['qrz_rcvd_mark'];
|
||||
}
|
||||
|
||||
// Prop-Mode not given? Create array-key andfill with null
|
||||
if (!(array_key_exists('prop_mode', $record))) {
|
||||
$record['prop_mode']=null;
|
||||
}
|
||||
|
||||
$record['call']=str_replace("_","/",$record['call']);
|
||||
$record['station_callsign']=str_replace("_","/",$record['station_callsign'] ?? '');
|
||||
if ($record['station_callsign'] ?? '' != '') {
|
||||
$status = $this->logbook_model->import_check($time_on, $record['call'], $record['band'], $record['mode'], $record['station_callsign'], $station_ids);
|
||||
$status = $this->logbook_model->import_check($time_on, $record['call'], $record['band'], $record['mode'], $record['prop_mode'], $record['station_callsign'], $station_ids);
|
||||
|
||||
if($status[0] == "Found") {
|
||||
$qrz_status = $this->logbook_model->qrz_update($status[1], $qsl_date, $record['qsl_rcvd']);
|
||||
|
||||
@@ -163,6 +163,11 @@ class EqslImporter
|
||||
$record['qsl_sent'] = $config['eqsl_rcvd_mark'];
|
||||
}
|
||||
|
||||
// Prop-Mode not given? Create array-key andfill with null
|
||||
if (!(array_key_exists('prop_mode', $record))) {
|
||||
$record['prop_mode']=null;
|
||||
}
|
||||
|
||||
// eQSL now provides EQSL_QSLRDATE so we can use it if it is present
|
||||
if ((array_key_exists('eqsl_qslrdate', $record)) && ($record['eqsl_qslrdate'] != '')) {
|
||||
$eqsl_qslrdate = $record['eqsl_qslrdate'];
|
||||
@@ -170,7 +175,7 @@ class EqslImporter
|
||||
$eqsl_qslrdate = date('Y-m-d');
|
||||
}
|
||||
|
||||
$status = $this->CI->logbook_model->import_check($time_on, $record['call'], $record['band'], $record['mode'], $station_callsign, $station_id);
|
||||
$status = $this->CI->logbook_model->import_check($time_on, $record['call'], $record['band'], $record['mode'], $record['prop_mode'], $station_callsign, $station_id);
|
||||
$qsoid = 0;
|
||||
if ($status[0] == "Found") {
|
||||
$qsoid = $status[1];
|
||||
|
||||
@@ -3589,7 +3589,7 @@ class Logbook_model extends CI_Model {
|
||||
}
|
||||
|
||||
/* Used to check if the qso is already in the database */
|
||||
function import_check($datetime, $callsign, $band, $mode, $station_callsign, $station_ids = null) {
|
||||
function import_check($datetime, $callsign, $band, $mode, $prop_mode, $station_callsign, $station_ids = null) {
|
||||
$binding = [];
|
||||
$mode = $this->get_main_mode_from_mode($mode);
|
||||
|
||||
@@ -3608,6 +3608,10 @@ class Logbook_model extends CI_Model {
|
||||
$binding[] = $band;
|
||||
$binding[] = $mode;
|
||||
|
||||
if (($prop_mode ?? '') != '') {
|
||||
$sql.=' AND COL_PROP_MODE=?';
|
||||
$binding[] = $prop_mode;
|
||||
}
|
||||
|
||||
if ((isset($station_ids)) && (($station_ids ?? '') != '')) {
|
||||
$sql .= ' AND station_id IN (' . $station_ids . ')';
|
||||
|
||||
Reference in New Issue
Block a user