Commit fd8c6d46 authored by Ad Schellevis's avatar Ad Schellevis

(legacy) wrap $config['interfaces'] in interfaces_assign.php

parent 408bab1a
...@@ -133,8 +133,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ...@@ -133,8 +133,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (isset($_POST['add_x']) && isset($_POST['if_add'])) { if (isset($_POST['add_x']) && isset($_POST['if_add'])) {
// ** Add new ** // ** Add new **
// if interface is already used, redirect. // if interface is already used, redirect.
foreach ($config['interfaces'] as $ifname => $ifdata) { foreach (legacy_config_get_interfaces() as $ifname => $ifdata) {
if ($ifdata['if'] == $_PORT['if_add']) { if ($ifdata['if'] == $_POST['if_add']) {
header("Location: interfaces_assign.php"); header("Location: interfaces_assign.php");
exit; exit;
} }
...@@ -341,7 +341,7 @@ legacy_html_escape_form_data($interfaces); ...@@ -341,7 +341,7 @@ legacy_html_escape_form_data($interfaces);
$unused_interfaces= array(); $unused_interfaces= array();
foreach ($interfaces as $portname => $portinfo) { foreach ($interfaces as $portname => $portinfo) {
$portused = false; $portused = false;
foreach ($config['interfaces'] as $ifname => $ifdata) { foreach (legacy_config_get_interfaces() as $ifname => $ifdata) {
if ($ifdata['if'] == $portname) { if ($ifdata['if'] == $portname) {
$portused = true; $portused = true;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment