Merge pull request #85 from phl0/devel

Add canonicalization also to localTx table
This commit is contained in:
Florian (DF2ET) 2017-01-18 12:13:12 +01:00 committed by GitHub
commit 5ca47107e2

View file

@ -27,15 +27,17 @@ if ($_GET['section'] == "localTx") {
$lastHeard = Array();
for ($i = 0; $i < count($localTXList); $i++) {
$listElem = $localTXList[$i];
// Generate a canonicalized call for QRZ and name lookups
$call_canon = preg_replace('/\s+\w$/', '', $listElem[2]);
if (defined("ENABLEXTDLOOKUP")) {
if ($listElem[6] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25")) {
$listElem[3] = getName($listElem[2]);
$listElem[3] = getName($call_canon);
if ($listElem[2] !== "??????????") {
if (!is_numeric($listElem[2])) {
if (defined("SHOWQRZ")) {
$listElem[2] = "<a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","&Oslash;",$listElem[2])."</a>";
$listElem[2] = "<a target=\"_new\" href=\"https://qrz.com/db/$call_canon\">".str_replace("0","&Oslash;",$listElem[2])."</a>";
} else {
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$listElem[2]\">".$listElem[2]."</a>";
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$call_canon\">".$listElem[2]."</a>";
}
} else {
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</a>";
@ -48,9 +50,9 @@ if ($_GET['section'] == "localTx") {
if ($listElem[2] !== "??????????") {
if (!is_numeric($listElem[2])) {
if (defined("SHOWQRZ")) {
$listElem[2] = "<a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","&Oslash;",$listElem[2])."</a>";
$listElem[2] = "<a target=\"_new\" href=\"https://qrz.com/db/$call_canon\">".str_replace("0","&Oslash;",$listElem[2])."</a>";
} else {
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$listElem[2]\">".$listElem[2]."</a>";
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$call_canon\">".$listElem[2]."</a>";
}
} else {
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</a>";