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) { ...@@ -92,13 +92,15 @@ function legacy_list_aliasses($type) {
$result = array(); $result = array();
if (isset($config['aliases']['alias'])) { if (isset($config['aliases']['alias'])) {
foreach ($config['aliases']['alias'] as $alias) { foreach ($config['aliases']['alias'] as $alias) {
if ($type == "port") { if (!empty($alias['address'])) {
if (preg_match("/port/i", $alias['type'])) { if ($type == "port") {
$result[] = $alias; if (preg_match("/port/i", $alias['type'])) {
} $result[] = $alias;
} else { }
if (!preg_match("/port/i", $alias['type'])){ } else {
$result[] = $alias; 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