From a114d6df96d2af911da7933949e39e937a55c1bc Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Wed, 4 Oct 2023 11:28:27 +0200 Subject: [PATCH] Gateways: Single: Migrate to MVC - Import first part of https://github.com/opnsense/core/pull/6808 o fix merge issue, as system_gateways_edit.php is not used in the new version, we do need to make sure it's hooked to the new code in master first. At a first glance dpinger_defaults() is the only missing part now. --- src/www/system_gateways_edit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/www/system_gateways_edit.php b/src/www/system_gateways_edit.php index 112b2f4ae..1fb6b9617 100644 --- a/src/www/system_gateways_edit.php +++ b/src/www/system_gateways_edit.php @@ -33,7 +33,7 @@ require_once("plugins.inc.d/dpinger.inc"); $gateways = new \OPNsense\Routing\Gateways(); $a_gateways = array_values($gateways->gatewaysIndexedByName(true, false, true)); -$dpinger_default = dpinger_defaults(); +$dpinger_default = $gateways->getDpingerDefaults(); // form processing if ($_SERVER['REQUEST_METHOD'] === 'POST') { @@ -200,7 +200,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { /**** /* XXX: dpinger needs to take defaults under consideration /****/ - $dpinger_config = dpinger_defaults(); + $dpinger_config = $gateways->getDpingerDefaults(); foreach ($dpinger_config as $prop => $value) { $dpinger_config[$prop] = !empty($pconfig[$prop]) ? $pconfig[$prop] : $value; }