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

(legacy) hide empty aliasses in list

parent 94404c1c
...@@ -92,6 +92,7 @@ function legacy_list_aliasses($type) { ...@@ -92,6 +92,7 @@ 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 (!empty($alias['address'])) {
if ($type == "port") { if ($type == "port") {
if (preg_match("/port/i", $alias['type'])) { if (preg_match("/port/i", $alias['type'])) {
$result[] = $alias; $result[] = $alias;
...@@ -103,6 +104,7 @@ function legacy_list_aliasses($type) { ...@@ -103,6 +104,7 @@ function legacy_list_aliasses($type) {
} }
} }
} }
}
return $result; return $result;
} }
......
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