mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
(legacy) extend legacy base with legacy_list_aliasses
This commit is contained in:
parent
1caf208168
commit
b4011e9ecb
@ -72,3 +72,26 @@ function legacy_html_escape_form_data(&$settings)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* list aliasses by type
|
||||
* @param string $type type port or network
|
||||
*/
|
||||
function legacy_list_aliasses($type) {
|
||||
global $config;
|
||||
$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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user