Commit 74d923fd authored by Ad Schellevis's avatar Ad Schellevis

(legacy) fix interface selection on post issues in floating rules, firewall_rules_edit.php

parent 0bba9c63
......@@ -778,7 +778,13 @@ include("head.inc");
<?php
endif;
foreach (formInterfaces() as $iface => $ifacename): ?>
<option value="<?=$iface;?>" <?= !empty($pconfig['interface']) && ($iface == $pconfig['interface'] || (!is_array($pconfig['interface']) && strpos($pconfig['interface'], ',') !== false && in_array($iface, explode(',', $pconfig['interface'])))) ? 'selected="selected"' : ''; ?>>
<option value="<?=$iface;?>"
<?= !empty($pconfig['interface']) && (
$iface == $pconfig['interface'] ||
// match floating / multiple interfaces
(!is_array($pconfig['interface']) && in_array($iface, explode(',', $pconfig['interface']))) ||
(is_array($pconfig['interface']) && in_array($iface, $pconfig['interface']))
) ? 'selected="selected"' : ''; ?>>
<?=htmlspecialchars($ifacename);?>
</option>
<?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