fixed name lookup to not look up partials
This commit is contained in:
parent
8f4d9c0dd1
commit
0bcd0ca908
2 changed files with 5 additions and 4 deletions
|
@ -489,10 +489,11 @@ function getName($callsign) {
|
||||||
if (strpos($callsign,"-")) {
|
if (strpos($callsign,"-")) {
|
||||||
$callsign = substr($callsign,0,strpos($callsign,"-"));
|
$callsign = substr($callsign,0,strpos($callsign,"-"));
|
||||||
}
|
}
|
||||||
exec("grep ".$callsign." ".DMRIDDATPATH, $output);
|
|
||||||
$delimiter =" ";
|
$delimiter =" ";
|
||||||
if (strpos($output[0],"\t")) {
|
exec("grep -P '".$callsign.$delimiter."' ".DMRIDDATPATH, $output);
|
||||||
$delimiter = "\t";
|
if (count($output) == 0) {
|
||||||
|
$delimiter = "\t";
|
||||||
|
exec("grep -P '".$callsign.$delimiter."' ".DMRIDDATPATH, $output);
|
||||||
}
|
}
|
||||||
$name = substr($output[0], strpos($output[0],$delimiter)+1);
|
$name = substr($output[0], strpos($output[0],$delimiter)+1);
|
||||||
$name = substr($name, strpos($name,$delimiter)+1);
|
$name = substr($name, strpos($name,$delimiter)+1);
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
define("VERSION", "20160820-1");
|
define("VERSION", "20160828-1");
|
||||||
?>
|
?>
|
Loading…
Reference in a new issue