From 697df67989e5f6b5edec3eec70cf1955870b4693 Mon Sep 17 00:00:00 2001 From: Rob Vella Date: Sun, 7 Feb 2021 15:46:14 -0800 Subject: [PATCH] Match IRLP correctly --- app.js | 3 ++- fetchData.php | 15 ++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app.js b/app.js index 7fdf0cb..e72b962 100644 --- a/app.js +++ b/app.js @@ -101,6 +101,7 @@ let App = new Vue({ let match = v.match(/([A-Za-z]+ [0-9]+ [0-9]+\:[0-9]+\:[0-9]+) (rpt|stn)([A-Za-z0-9]+) .*? (?:\[(?:via) ([0-9]+))?/); if (!match) return; + match[2] = match[3] < 2000 ? 'stn' : match[2]; let type = this.getNodeType(match[2]); this.addEntry( @@ -162,4 +163,4 @@ String.prototype.hashCode = function() { hash = hash & hash; // Convert to 32bit integer } return Math.abs(hash); -}; \ No newline at end of file +}; diff --git a/fetchData.php b/fetchData.php index 2fc3d0c..7eaa41b 100644 --- a/fetchData.php +++ b/fetchData.php @@ -1,7 +1,7 @@ $node, - 'callsign' => $row[1], - 'desc' => $row[2], - 'location' => $row[3] + 'callsign' => $row[1] ?? '', + 'desc' => $row[2] ?? '', + 'location' => $row[3] ?? '' ]; } return [ - 'node' => $node + 'node' => $node, + 'callsign' => $row[1], ]; }