这个提交包含在:
Peter Goodhall 2025-08-02 11:05:06 +01:00
当前提交 c66688754b
共有 2 个文件被更改,包括 9 次插入5 次删除

查看文件

@ -324,7 +324,7 @@ class Qrz extends CI_Controller {
// Return the structured error array here too for consistency
return ['status' => 'error', 'message' => $error_message];
}
$url = 'http://logbook.qrz.com/api'; // Correct URL
$url = 'https://logbook.qrz.com/api'; // Correct URL
$post_data['KEY'] = $qrz_api_key; // Correct parameter
$post_data['ACTION'] = 'FETCH'; // Correct parameter
@ -338,6 +338,9 @@ class Qrz extends CI_Controller {
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true); // Correct - get response as string
curl_setopt( $ch, CURLOPT_TIMEOUT, 300); // 5 minute timeout
curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 30); // 30 second connection timeout
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
curl_setopt($ch, CURLOPT_BUFFERSIZE, 128000);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
$content = curl_exec($ch); // Get raw content
$curl_error = curl_error($ch); // Check for cURL errors

查看文件

@ -4889,7 +4889,7 @@ class Logbook_model extends CI_Model
foreach ($batch_data as $record) {
$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_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->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
$indexed_results = [];
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'];
}
@ -4920,7 +4921,7 @@ class Logbook_model extends CI_Model
$update_batch_data[] = [
'COL_PRIMARY_KEY' => $primary_key,
'COL_QRZCOM_QSO_DOWNLOAD_DATE' => $record['qsl_date'],
'COL_QRZCOM_QSO_UPLOAD_STATUS' => $record['qsl_rcvd'] // Should be 'Y' if confirmed
'COL_QRZCOM_QSO_DOWNLOAD_STATUS' => $record['qsl_rcvd'] // Should be 'Y' if confirmed
];
}
@ -4989,4 +4990,4 @@ function validateADIFDate($date, $format = 'Ymd')
{
$d = DateTime::createFromFormat($format, $date);
return $d && $d->format($format) == $date;
}
}