Add a check when doing QRZ lookups to see if the session is valid, if not, create a new session and try again.
这个提交包含在:
父节点
064075980b
当前提交
a5561236b1
共有 1 个文件被更改,包括 8 次插入 和 0 次删除
|
|
@ -2191,6 +2191,14 @@ class Logbook_model extends CI_Model {
|
|||
|
||||
|
||||
$callbook = $this->qrz->search($callsign, $this->session->userdata('qrz_session_key'), $use_fullname);
|
||||
|
||||
// if we got nothing, it's probably because our session key is invalid, try again
|
||||
if (!isset($callbook['callsign']))
|
||||
{
|
||||
$qrz_session_key = $this->qrz->session($this->config->item('qrz_username'), $this->config->item('qrz_password'));
|
||||
$this->session->set_userdata('qrz_session_key', $qrz_session_key);
|
||||
$callbook = $this->qrz->search($callsign, $this->session->userdata('qrz_session_key'), $use_fullname);
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->config->item('callbook') == "hamqth" && $this->config->item('hamqth_username') != null && $this->config->item('hamqth_password') != null) {
|
||||
|
|
|
|||
正在加载…
在新工单中引用