fixed name lookup to not look up partials

This commit is contained in:
dg9vh 2016-08-28 19:46:08 +00:00
parent 8f4d9c0dd1
commit 0bcd0ca908
2 changed files with 5 additions and 4 deletions

View file

@ -489,10 +489,11 @@ function getName($callsign) {
if (strpos($callsign,"-")) {
$callsign = substr($callsign,0,strpos($callsign,"-"));
}
exec("grep ".$callsign." ".DMRIDDATPATH, $output);
$delimiter =" ";
if (strpos($output[0],"\t")) {
$delimiter = "\t";
exec("grep -P '".$callsign.$delimiter."' ".DMRIDDATPATH, $output);
if (count($output) == 0) {
$delimiter = "\t";
exec("grep -P '".$callsign.$delimiter."' ".DMRIDDATPATH, $output);
}
$name = substr($output[0], strpos($output[0],$delimiter)+1);
$name = substr($name, strpos($name,$delimiter)+1);

View file

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