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

This commit is contained in:
Ad Schellevis 2016-02-02 09:29:43 +01:00
parent 0bba9c6351
commit 74d923fd1f

View File

@ -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