Merge pull request #202 from IZ7BOJ/patch-2

update functions.php
This commit is contained in:
Kim - DG9VH 2020-05-02 16:39:04 +02:00 committed by GitHub
commit 86b02015ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -586,6 +586,10 @@ function getLastHeard($logLines, $onlyLast) {
if(!(array_search($listElem[2]."#".$listElem[1].$listElem[4], $heardCalls) > -1)) { if(!(array_search($listElem[2]."#".$listElem[1].$listElem[4], $heardCalls) > -1)) {
// Generate a canonicalized call for QRZ and name lookups // Generate a canonicalized call for QRZ and name lookups
$call_canon = preg_replace('/\s+\w$/', '', $listElem[2]); $call_canon = preg_replace('/\s+\w$/', '', $listElem[2]);
//remove suffix used sometimes in YSF (es: -FT2 , -991)
if (strpos($call_canon,"-")!=false) {
$call_canon = substr($call_canon, 0, strpos($call_canon, "-"));
}
array_push($heardCalls, $listElem[2]."#".$listElem[1].$listElem[4]); array_push($heardCalls, $listElem[2]."#".$listElem[1].$listElem[4]);
if (defined("ENABLEXTDLOOKUP")) { if (defined("ENABLEXTDLOOKUP")) {
if ($listElem[2] !== "??????????") { if ($listElem[2] !== "??????????") {