Commit 46a8d2f5 authored by Franco Fichtner's avatar Franco Fichtner

vpn: can't have zero clients

(cherry picked from commit fc381754)
parent 3e170015
......@@ -267,8 +267,9 @@ include("head.inc");
<td>
<select id="n_l2tp_units" name="n_l2tp_units">
<?php
for ($x=0; $x<255; $x++) {
if ($x == $pconfig['n_l2tp_units']) {
$toselect = ($pconfig['n_l2tp_units'] > 0) ? $pconfig['n_l2tp_units'] : 16;
for ($x=1; $x<255; $x++) {
if ($x == $toselect) {
$SELECTED = " selected=\"selected\"";
} else {
$SELECTED = "";
......
......@@ -325,8 +325,9 @@ legacy_html_escape_form_data($pconfig);
<td>
<select id="n_pppoe_units" name="n_pppoe_units">
<?php
for ($x=0; $x<255; $x++):?>
<option value="<?=$x;?>" <?=$x == $pconfig['n_pppoe_units'] ? "selected=\"selected\"" : "" ;?>>
$toselect = ($pconfig['n_pppoe_units'] > 0) ? $pconfig['n_pppoe_units'] : 16;
for ($x=1; $x<255; $x++):?>
<option value="<?=$x;?>" <?=$x == $toselect ? "selected=\"selected\"" : "" ;?>>
<?=$x;?>
<?php
endfor;?>
......
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