Fix mismatch between index key and match key for QRZ upload

这个提交包含在:
Steven Dodd 2025-07-31 21:26:47 +01:00 提交者 GitHub
父节点 f502de6338
当前提交 f4521dee31
找不到此签名对应的密钥
GPG 密钥 ID: B5690EEEBB952194

查看文件

@ -4889,7 +4889,7 @@ class Logbook_model extends CI_Model
foreach ($batch_data as $record) { foreach ($batch_data as $record) {
$this->db->or_group_start(); // Start group for this record's AND conditions $this->db->or_group_start(); // Start group for this record's AND conditions
$this->db->where($this->config->item('table_name').'.COL_CALL', $record['call']); $this->db->where($this->config->item('table_name').'.COL_CALL', $record['call']);
$this->db->where($this->config->item('table_name').'.COL_TIME_ON', $record['time_on']); $this->db->like($this->config->item('table_name').'.COL_TIME_ON', $record['time_on'], 'after');
$this->db->where($this->config->item('table_name').'.COL_BAND', $record['band']); $this->db->where($this->config->item('table_name').'.COL_BAND', $record['band']);
$this->db->group_end(); // End group for this record's AND conditions $this->db->group_end(); // End group for this record's AND conditions
} }
@ -4902,7 +4902,8 @@ class Logbook_model extends CI_Model
// Index DB results for faster lookup // Index DB results for faster lookup
$indexed_results = []; $indexed_results = [];
foreach ($db_results as $row) { foreach ($db_results as $row) {
$key = $row['COL_CALL'] . '|' . $row['COL_TIME_ON'] . '|' . $row['COL_BAND']; $time = substr($row['COL_TIME_ON'], 0, 16);
$key = $row['COL_CALL'] . '|' . $time . '|' . $row['COL_BAND'];
$indexed_results[$key] = $row['COL_PRIMARY_KEY']; $indexed_results[$key] = $row['COL_PRIMARY_KEY'];
} }
@ -4989,4 +4990,4 @@ function validateADIFDate($date, $format = 'Ymd')
{ {
$d = DateTime::createFromFormat($format, $date); $d = DateTime::createFromFormat($format, $date);
return $d && $d->format($format) == $date; return $d && $d->format($format) == $date;
} }