Merge pull request #2563 from int2001/lazy_search

Search for "Base-Call" instead of Prefix+Call
这个提交包含在:
Peter Goodhall 2023-10-12 14:47:34 +01:00 提交者 GitHub
当前提交 f6ba9eef8f
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23

查看文件

@ -135,7 +135,18 @@ class Logbook extends CI_Controller {
]; ];
$return['dxcc'] = $this->dxcheck($callsign); $return['dxcc'] = $this->dxcheck($callsign);
$return['partial'] = $this->partial($callsign); $split_callsign=explode('/',$callsign);
if (isset($split_callsign[1]) && ($split_callsign[1] != "")) { // Do we have "/" in Call?
if (strlen($split_callsign[1])>3) { // Last Element longer than 3 chars? Take that as call
$lookupcall = $split_callsign[1];
} else { // Last Element up to 3 Chars? Take first element as Call
$lookupcall = $split_callsign[0];
}
} else {
$lookupcall=$callsign;
}
$return['partial'] = $this->partial($lookupcall);
$callbook = $this->logbook_model->loadCallBook($callsign, $this->config->item('use_fullname')); $callbook = $this->logbook_model->loadCallBook($callsign, $this->config->item('use_fullname'));
@ -872,7 +883,11 @@ function worked_grid_before($gridsquare, $type, $band, $mode)
$fixedid = $id; $fixedid = $id;
if ($id2 != "") { if ($id2 != "") {
$fixedid = $id . '/' . $id2; if (strlen($id2)>3) { // Last Element longer than 3 chars? Take that as call
$fixedid = $id2;
} else { // Last Element up to 3 Chars? Take first element as Call
$fixedid = $id;
}
} }
$query = $this->querydb($fixedid); $query = $this->querydb($fixedid);