From 37efb1f02968fb579b2b6ff2dec4062ac2547ee5 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 16 Aug 2024 12:46:06 +0200 Subject: [PATCH] interfaces: light scrubbing for interfaces page #7446 We want to avoid modifying ports for the PPP devices and rearrange the type feed slightly. Most of the PHP warnings on this page relate to PPP trickery that will go away. Next step will be only offering the matching IPv4/6 types. Fix one valid warning while here. --- src/www/interfaces.php | 61 +++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/src/www/interfaces.php b/src/www/interfaces.php index a7574f226..565eb47db 100644 --- a/src/www/interfaces.php +++ b/src/www/interfaces.php @@ -1432,6 +1432,27 @@ if (isset($a_interfaces[$if]['wireless'])) { // Find all possible media options for the interface $mediaopts_list = legacy_interface_details($pconfig['if'])['supported_media'] ?? []; +$types4 = [ + 'none' => gettext('None'), + 'staticv4' => gettext('Static IPv4'), + 'dhcp' => gettext('DHCP'), + 'ppp' => gettext('PPP'), + 'pppoe' => gettext('PPPoE'), + 'pptp' => gettext('PPTP'), + 'l2tp' => gettext('L2TP'), +]; + +$types6 = [ + 'none' => gettext('None'), + 'staticv6' => gettext('Static IPv6'), + 'dhcp6' => gettext('DHCPv6'), + 'pppoev6' => gettext('PPPoEv6'), + 'slaac' => gettext('SLAAC'), + '6rd' => gettext('6rd Tunnel'), + '6to4' => gettext('6to4 Tunnel'), + 'track6' => gettext('Track Interface') +]; + include("head.inc"); ?> @@ -1858,13 +1879,10 @@ include("head.inc"); - + $opt): ?> + + @@ -1872,12 +1890,9 @@ include("head.inc"); @@ -2311,23 +2326,9 @@ include("head.inc"); - + - + @@ -2947,7 +2948,7 @@ include("head.inc");