From 92fc6116912755b2bb53a1a388a4a859efae4380 Mon Sep 17 00:00:00 2001 From: dg9vh Date: Fri, 15 Jul 2016 21:35:59 +0000 Subject: [PATCH] getting tabs and spaces as delimiter for resolving... --- include/functions.php | 8 ++++++-- version.php | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/functions.php b/include/functions.php index 2ee49bd..5b75a2d 100644 --- a/include/functions.php +++ b/include/functions.php @@ -484,8 +484,12 @@ function getName($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); + $delimiter =" "; + if (strpos($output[0],"\t")) { + $delimiter = "\t"; + } + $name = substr($output[0], strpos($output[0],$delimiter)+1); + $name = substr($name, strpos($name,$delimiter)+1); return $name; } diff --git a/version.php b/version.php index 7c8c844..e0d0bc9 100644 --- a/version.php +++ b/version.php @@ -1,3 +1,3 @@ \ No newline at end of file