1
0
Fork 0
mirror of https://github.com/myvesta/vesta synced 2025-08-11 00:57:41 -07:00

Fix "Parsing error" if a NAT IP is specified

https://bugs.vestacp.com/issues/325
This commit is contained in:
kondurake 2016-08-02 18:48:21 +03:00 committed by GitHub
commit cfcc7d62a0

View file

@ -65,15 +65,10 @@
<td>
<select class="vst-list" name="v_ip">
<?php
foreach ($ips as $key => $value) {
$display_ip = $key;
if (!empty($value['NAT'])) $display_ip = $value['NAT'];
$skey = "'".$display_ip."'";
echo "\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"".htmlentities($display_ip)."\"";
if ((!empty($v_ip)) && ( $display_ip == $v_ip ) || ( $skey == $v_ip )){
echo ' selected';
}
echo ">".htmlentities($display_ip)."</option>\n";
foreach ($ips as $ip => $value) {
$display_ip = htmlentities(empty($value['NAT']) ? $ip : "{$ip} → {$value['NAT']}");
$ip_selected = ((!empty($v_ip) && $ip == $v_ip) || $v_ip == "'{$ip}'") ? 'selected' : '';
echo "\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"{$ip}\" {$ip_selected}>{$display_ip}</option>\n";
}
?>
</select>