Skip to content

Commit ed782ed

Browse files
committed
target and local-port use the alias formatter too, add them to result
1 parent 32d6915 commit ed782ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api/DNatController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ public function searchRuleAction()
4848

4949
$results = $this->searchBase("rule", null, "sequence", $filter_funct);
5050

51-
/* curry results */
51+
/* carry results */
5252
foreach ($results['rows'] as &$record) {
5353
/* offer list of colors to be used by the frontend */
5454
$record['category_colors'] = $this->getCategoryColors(explode(',', $record['categories']));
5555
/* format "networks" and ports */
56-
foreach (['source.network','source.port','destination.network','destination.port'] as $field) {
56+
foreach (['source.network','source.port','destination.network','destination.port', 'target', 'local-port'] as $field) {
5757
if (!empty($record[$field])) {
5858
$record["alias_meta_{$field}"] = $this->getNetworks($record[$field]);
5959
}

0 commit comments

Comments
 (0)