Merge pull request #2359 from int2001/get_qso_fix

When inserting qso via API (or logging) set get_qso to trusted
这个提交包含在:
Peter Goodhall 2023-08-01 22:11:14 +01:00 提交者 GitHub
当前提交 ef77d65bfb
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23

查看文件

@ -536,7 +536,7 @@ class Logbook_model extends CI_Model {
if (isset($result->hrdlog_code) && $result->hrdlogrealtime == 1) { if (isset($result->hrdlog_code) && $result->hrdlogrealtime == 1) {
$CI =& get_instance(); $CI =& get_instance();
$CI->load->library('AdifHelper'); $CI->load->library('AdifHelper');
$qso = $this->get_qso($last_id)->result(); $qso = $this->get_qso($last_id,true)->result();
$adif = $CI->adifhelper->getAdifLine($qso[0]); $adif = $CI->adifhelper->getAdifLine($qso[0]);
$result = $this->push_qso_to_hrdlog($result->hrdlog_code, $data['COL_STATION_CALLSIGN'], $adif); $result = $this->push_qso_to_hrdlog($result->hrdlog_code, $data['COL_STATION_CALLSIGN'], $adif);
@ -550,7 +550,7 @@ class Logbook_model extends CI_Model {
if (isset($result->qrzapikey) && $result->qrzrealtime == 1) { if (isset($result->qrzapikey) && $result->qrzrealtime == 1) {
$CI =& get_instance(); $CI =& get_instance();
$CI->load->library('AdifHelper'); $CI->load->library('AdifHelper');
$qso = $this->get_qso($last_id)->result(); $qso = $this->get_qso($last_id,true)->result();
$adif = $CI->adifhelper->getAdifLine($qso[0]); $adif = $CI->adifhelper->getAdifLine($qso[0]);
$result = $this->push_qso_to_qrz($result->qrzapikey, $adif); $result = $this->push_qso_to_qrz($result->qrzapikey, $adif);
@ -564,7 +564,7 @@ class Logbook_model extends CI_Model {
if (isset($result->webadifapikey) && $result->webadifrealtime == 1) { if (isset($result->webadifapikey) && $result->webadifrealtime == 1) {
$CI =& get_instance(); $CI =& get_instance();
$CI->load->library('AdifHelper'); $CI->load->library('AdifHelper');
$qso = $this->get_qso($last_id)->result(); $qso = $this->get_qso($last_id,true)->result();
$adif = $CI->adifhelper->getAdifLine($qso[0]); $adif = $CI->adifhelper->getAdifLine($qso[0]);
$result = $this->push_qso_to_webadif( $result = $this->push_qso_to_webadif(
@ -1446,8 +1446,8 @@ class Logbook_model extends CI_Model {
return $this->db->get(); return $this->db->get();
} }
function get_qso($id) { function get_qso($id, $trusted = false) {
if ($this->logbook_model->check_qso_is_accessible($id)) { if ($trusted || ($this->logbook_model->check_qso_is_accessible($id))) {
$this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, coalesce(dxcc_entities_2.name, "- NONE -") as station_country, dxcc_entities_2.end as station_end, eQSL_images.image_file as eqsl_image_file, lotw_users.callsign as lotwuser, lotw_users.lastupload'); $this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, coalesce(dxcc_entities_2.name, "- NONE -") as station_country, dxcc_entities_2.end as station_end, eQSL_images.image_file as eqsl_image_file, lotw_users.callsign as lotwuser, lotw_users.lastupload');
$this->db->from($this->config->item('table_name')); $this->db->from($this->config->item('table_name'));
$this->db->join('dxcc_entities', $this->config->item('table_name').'.col_dxcc = dxcc_entities.adif', 'left'); $this->db->join('dxcc_entities', $this->config->item('table_name').'.col_dxcc = dxcc_entities.adif', 'left');