mirror of
https://github.com/opnsense/core.git
synced 2026-05-28 04:34:51 -04:00
Firewall - fix interface sortng by value for live-log and groups, closes https://github.com/opnsense/core/issues/10348
We might consider moving the sorting logic to BaseListField at some point as most cases expect sort by value anyway and we only have a couple of exceptions to that logic.
This commit is contained in:
parent
e209de9719
commit
6ffad1bb73
2 changed files with 4 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* Copyright (C) 2016 Deciso B.V.
|
||||
* Copyright (C) 2016-2026 Deciso B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
@ -52,6 +52,7 @@ class InterfaceController extends ApiControllerBase
|
|||
$intfmap[(string)$node->if] = !empty((string)$node->descr) ? (string)$node->descr : strtoupper($key);
|
||||
}
|
||||
}
|
||||
natcasesort($intfmap);
|
||||
return $intfmap;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* Copyright (C) 2023 Deciso B.V.
|
||||
* Copyright (C) 2023-2026 Deciso B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
@ -50,6 +50,7 @@ class InterfaceField extends BaseListField
|
|||
}
|
||||
}
|
||||
$this->internalOptionList = self::$parent_interfaces;
|
||||
natcasesort($this->internalOptionList);
|
||||
return parent::actionPostLoadingEvent();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue