fixed DMR-Master-list for detecting, if DMRplus-Network is used

This commit is contained in:
dg9vh 2017-04-27 16:13:18 +00:00
parent d599e6be39
commit f882cbc127
2 changed files with 9 additions and 9 deletions

View file

@ -842,13 +842,13 @@ function getDMRReflectors() {
return $refls;
}
function getBrandMeisterDMRMasterList() {
$data = file_get_contents("http://185.79.71.94/dmr/dmrmaster.php");
function getDMRplusDMRMasterList() {
$data = file_get_contents("http://ham-dmr.de/dmr/dmrmaster2.php");
$rows = explode("\n",$data);
$masters = array();
$s = array();
foreach($rows as $row) {
$masters[] = str_getcsv($row,"@",'');
$s[] = str_getcsv($row,"@",'');
}
return $masters;
return $s;
}
?>

View file

@ -128,7 +128,7 @@ if (defined("ENABLENETWORKSWITCHING")) {
<button onclick="window.location.href='./scripts/switchnetwork.php?network=BRANDMEISTER'" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-fire" aria-hidden="true"></span>&nbsp;<?php echo _("BrandMeister"); ?></button>
<?php
}
if (defined("ENABLEREFLECTORSWITCHING") && (getEnabled("DMR Network", $mmdvmconfigs) == 1) && !recursive_array_search(gethostbyname(getConfigItem("DMR Network", "Address", $mmdvmconfigs)),getBrandMeisterDMRMasterList()) ) {
if (defined("ENABLEREFLECTORSWITCHING") && (getEnabled("DMR Network", $mmdvmconfigs) == 1) && recursive_array_search(gethostbyname(getConfigItem("DMR Network", "Address", $mmdvmconfigs)),getDMRplusDMRMasterList()) ) {
$reflectors = getDMRReflectors();
?>
<form method = "get" action ="./scripts/switchreflector.php" class="form-inline" role="form">