From 69c19afa6cc42388b8bd48b827c67a46b9a31828 Mon Sep 17 00:00:00 2001 From: dg9vh Date: Fri, 15 Jul 2016 20:52:40 +0000 Subject: [PATCH] remove whitespaces and -suffixes in lookup --- include/functions.php | 4 ++++ version.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/functions.php b/include/functions.php index 04ad042..2ee49bd 100644 --- a/include/functions.php +++ b/include/functions.php @@ -479,6 +479,10 @@ function getActiveYSFReflectors($logLines) { } function getName($callsign) { + $callsign = trim($callsign); + if (strpos($callsign,"-")) { + $callsign = substr($callsign,0,strpos($callsign,"-")); + } exec("grep ".$callsign." ".DMRIDDATPATH, $output); $name = substr($output[0], strpos($output[0]," ")+1); $name = substr($name, strpos($name," ")+1); diff --git a/version.php b/version.php index e61d70d..7c8c844 100644 --- a/version.php +++ b/version.php @@ -1,3 +1,3 @@ \ No newline at end of file