getting tabs and spaces as delimiter for resolving...

This commit is contained in:
dg9vh 2016-07-15 21:35:59 +00:00
parent 69c19afa6c
commit 92fc611691
2 changed files with 7 additions and 3 deletions

View file

@ -484,8 +484,12 @@ function getName($callsign) {
$callsign = substr($callsign,0,strpos($callsign,"-")); $callsign = substr($callsign,0,strpos($callsign,"-"));
} }
exec("grep ".$callsign." ".DMRIDDATPATH, $output); exec("grep ".$callsign." ".DMRIDDATPATH, $output);
$name = substr($output[0], strpos($output[0]," ")+1); $delimiter =" ";
$name = substr($name, strpos($name," ")+1); 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; return $name;
} }

View file

@ -1,3 +1,3 @@
<?php <?php
define("VERSION", "20160715-2"); define("VERSION", "20160715-3");
?> ?>