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

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

(cherry picked from commit 74d923fd)
parent 5dba1153
......@@ -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