Commit 66e7402f authored by Ad Schellevis's avatar Ad Schellevis

(legacy) hide empty aliasses in list

parent 94404c1c
......@@ -92,13 +92,15 @@ function legacy_list_aliasses($type) {
$result = array();
if (isset($config['aliases']['alias'])) {
foreach ($config['aliases']['alias'] as $alias) {
if ($type == "port") {
if (preg_match("/port/i", $alias['type'])) {
$result[] = $alias;
}
} else {
if (!preg_match("/port/i", $alias['type'])){
$result[] = $alias;
if (!empty($alias['address'])) {
if ($type == "port") {
if (preg_match("/port/i", $alias['type'])) {
$result[] = $alias;
}
} else {
if (!preg_match("/port/i", $alias['type'])){
$result[] = $alias;
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment