Commit f82e3584 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(WOL) fix selection, for https://github.com/opnsense/core/issues/1148

(cherry picked from commit 0441cf4c)
(cherry picked from commit 26568482)
parent f04f0f4e
...@@ -37,8 +37,7 @@ if (empty($config['wol']['wolentry']) || !is_array($config['wol']['wolentry'])) ...@@ -37,8 +37,7 @@ if (empty($config['wol']['wolentry']) || !is_array($config['wol']['wolentry']))
$a_wol = &$config['wol']['wolentry']; $a_wol = &$config['wol']['wolentry'];
if ($_SERVER['REQUEST_METHOD'] === 'GET') { if ($_SERVER['REQUEST_METHOD'] === 'POST') {
} elseif ($_SERVER['REQUEST_METHOD'] === 'POST') {
// delete entry // delete entry
if (isset($_POST['act']) && $_POST['act'] == "del" && isset($_POST['id'])) { if (isset($_POST['act']) && $_POST['act'] == "del" && isset($_POST['id'])) {
if (!empty($a_wol[$_POST['id']])) { if (!empty($a_wol[$_POST['id']])) {
...@@ -141,7 +140,7 @@ include("head.inc"); ...@@ -141,7 +140,7 @@ include("head.inc");
<?php if (isset($savemsg)) print_info_box($savemsg); ?> <?php if (isset($savemsg)) print_info_box($savemsg); ?>
<section class="col-xs-12"> <section class="col-xs-12">
<div class="content-box"> <div class="content-box">
<div class="content-box-main "> <div class="content-box-main">
<form method="post" name="iform" id="iform"> <form method="post" name="iform" id="iform">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped opnsense_standard_table_form"> <table class="table table-striped opnsense_standard_table_form">
...@@ -171,7 +170,7 @@ include("head.inc"); ...@@ -171,7 +170,7 @@ include("head.inc");
$if = null; $if = null;
} }
foreach (get_configured_interface_with_descr() as $iface => $ifacename): ?> foreach (get_configured_interface_with_descr() as $iface => $ifacename): ?>
<option value="<?=$iface;?>" <?=!link_interface_to_bridge($iface) && $iface == $if ? "selected=\"selected\"" : ""; ?>> <option value="<?=$iface;?>" <?=$iface == $if ? "selected=\"selected\"" : ""; ?>>
<?=htmlspecialchars($ifacename);?> <?=htmlspecialchars($ifacename);?>
</option> </option>
<?php <?php
......
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