[Logbook Advanced] Fixed callbook update
这个提交包含在:
父节点
e03c6aab22
当前提交
3383e5a92a
共有 2 个文件被更改,包括 18 次插入 和 6 次删除
|
|
@ -141,7 +141,7 @@ class Logbookadvanced extends CI_Controller {
|
||||||
$this->load->model('logbookadvanced_model');
|
$this->load->model('logbookadvanced_model');
|
||||||
|
|
||||||
$qsoID = xss_clean($this->input->post('qsoID'));
|
$qsoID = xss_clean($this->input->post('qsoID'));
|
||||||
$qso = $this->logbook_model->qso_info($qsoID)->row_array();
|
$qso = $this->qso_info($qsoID)->row_array();
|
||||||
if ($qso === null) {
|
if ($qso === null) {
|
||||||
header("Content-Type: application/json");
|
header("Content-Type: application/json");
|
||||||
echo json_encode([]);
|
echo json_encode([]);
|
||||||
|
|
@ -152,10 +152,7 @@ class Logbookadvanced extends CI_Controller {
|
||||||
|
|
||||||
if ($callbook['callsign'] ?? "" !== "") {
|
if ($callbook['callsign'] ?? "" !== "") {
|
||||||
$this->logbookadvanced_model->updateQsoWithCallbookInfo($qsoID, $qso, $callbook);
|
$this->logbookadvanced_model->updateQsoWithCallbookInfo($qsoID, $qso, $callbook);
|
||||||
$qso['COL_NAME'] = trim($callbook['name']);
|
$qso = $this->qso_info($qsoID)->row_array();
|
||||||
if (isset($callbook['qslmgr'])) {
|
|
||||||
$qso['COL_QSL_VIA'] = trim($callbook['qslmgr']);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$qsoObj = new QSO($qso);
|
$qsoObj = new QSO($qso);
|
||||||
|
|
@ -164,6 +161,21 @@ class Logbookadvanced extends CI_Controller {
|
||||||
echo json_encode($qsoObj->toArray());
|
echo json_encode($qsoObj->toArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Return QSO Info */
|
||||||
|
function qso_info($id) {
|
||||||
|
$this->load->model('logbook_model');
|
||||||
|
if ($this->logbook_model->check_qso_is_accessible($id)) {
|
||||||
|
$this->db->where('COL_PRIMARY_KEY', $id);
|
||||||
|
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
|
||||||
|
$this->db->join('dxcc_entities', $this->config->item('table_name').'.col_dxcc = dxcc_entities.adif', 'left');
|
||||||
|
$this->db->join('lotw_users', 'lotw_users.callsign = '.$this->config->item('table_name').'.col_call', 'left outer');
|
||||||
|
|
||||||
|
return $this->db->get($this->config->item('table_name'));
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function export_to_adif() {
|
function export_to_adif() {
|
||||||
$this->load->model('logbookadvanced_model');
|
$this->load->model('logbookadvanced_model');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ function updateRow(qso) {
|
||||||
cells.eq(c++).html(qso.dxcc);
|
cells.eq(c++).html(qso.dxcc);
|
||||||
}
|
}
|
||||||
if (user_options.state.show == "true"){
|
if (user_options.state.show == "true"){
|
||||||
cells.eq(c++).text(qso.state);
|
cells.eq(c++).html(qso.state);
|
||||||
}
|
}
|
||||||
if (user_options.cqzone.show == "true"){
|
if (user_options.cqzone.show == "true"){
|
||||||
cells.eq(c++).html(qso.cqzone);
|
cells.eq(c++).html(qso.cqzone);
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用