mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
Firewall/alias, add not selected aliases to tokeniser, for https://github.com/opnsense/core/issues/3065
This commit is contained in:
parent
9741e9874e
commit
ab4e900a52
@ -97,7 +97,16 @@ class AliasController extends ApiMutableModelControllerBase
|
||||
*/
|
||||
public function getItemAction($uuid = null)
|
||||
{
|
||||
return $this->getBase("alias", "aliases.alias", $uuid);
|
||||
$response = $this->getBase("alias", "aliases.alias", $uuid);
|
||||
$selected_aliases = array_keys($response['alias']['content']);
|
||||
foreach ($this->getModel()->aliasIterator() as $alias) {
|
||||
if (!in_array($alias['name'], $selected_aliases)) {
|
||||
$response['alias']['content'][$alias['name']] = array(
|
||||
"selected" => 0, "value" =>$alias['name']
|
||||
);
|
||||
}
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user