From 70bb40a378cfc67b5bd27ab5ff28b44a45e8df78 Mon Sep 17 00:00:00 2001 From: Alfredo Vania - IZ7BOJ <38103662+IZ7BOJ@users.noreply.github.com> Date: Sat, 2 May 2020 16:37:59 +0200 Subject: [PATCH] update functions.php In case of ENABLEXTDLOOKUP enabled, qrz.com can't resolve callsign if there is a suffix on it. Added the cut of the suffix before redirecting to qrz.com. --- include/functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/functions.php b/include/functions.php index 446695b..36cb2c3 100644 --- a/include/functions.php +++ b/include/functions.php @@ -586,6 +586,10 @@ function getLastHeard($logLines, $onlyLast) { if(!(array_search($listElem[2]."#".$listElem[1].$listElem[4], $heardCalls) > -1)) { // Generate a canonicalized call for QRZ and name lookups $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]); if (defined("ENABLEXTDLOOKUP")) { if ($listElem[2] !== "??????????") {