fixes issue where dxcc wasn't grabbed from callbook

pull/2899/head^2
Peter Goodhall 2024-01-01 16:25:56 +00:00
rodzic a12ffe87d4
commit 28f19d0350
1 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -833,6 +833,11 @@ class Logbook extends CI_Controller {
$this->session->set_userdata('qrz_session_key', $qrz_session_key); $this->session->set_userdata('qrz_session_key', $qrz_session_key);
$callsign['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'), $this->config->item('use_fullname')); $callsign['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'), $this->config->item('use_fullname'));
} }
if (isset($callsign['callsign']['dxcc'])) {
$this->load->model('logbook_model');
$entity = $this->logbook_model->get_entity($callsign['callsign']['dxcc']);
$callsign['callsign']['dxcc_name'] = $entity['name'];
}
} else if ($this->config->item('callbook') == "hamqth" && $this->config->item('hamqth_username') != null && $this->config->item('hamqth_password') != null) { } else if ($this->config->item('callbook') == "hamqth" && $this->config->item('hamqth_username') != null && $this->config->item('hamqth_password') != null) {
// Load the HamQTH library // Load the HamQTH library
$this->load->library('hamqth'); $this->load->library('hamqth');
@ -854,6 +859,11 @@ class Logbook extends CI_Controller {
$this->load->model('logbook_model'); $this->load->model('logbook_model');
$callsign['grid_worked'] = $this->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($data['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band')); $callsign['grid_worked'] = $this->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($data['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band'));
} }
if (isset($callsign['callsign']['dxcc'])) {
$this->load->model('logbook_model');
$entity = $this->logbook_model->get_entity($callsign['callsign']['dxcc']);
$callsign['callsign']['dxcc_name'] = $entity['name'];
}
if (isset($callsign['callsign']['error'])) { if (isset($callsign['callsign']['error'])) {
$callsign['error'] = $callsign['callsign']['error']; $callsign['error'] = $callsign['callsign']['error'];
} }
@ -876,8 +886,8 @@ class Logbook extends CI_Controller {
if (isset($callsign['callsign']['error'])) { if (isset($callsign['callsign']['error'])) {
$callsign['error'] = $callsign['callsign']['error']; $callsign['error'] = $callsign['callsign']['error'];
} }
$callsign['id'] = strtoupper($id);
$callsign['id'] = strtoupper($id);
return $this->load->view('search/result', $callsign, true); return $this->load->view('search/result', $callsign, true);
} }
} }