Allow hostname/ip to be deleted if the captive portal is not enabled

This commit is contained in:
Stephen Jones 2018-06-07 14:20:07 -05:00
parent a273f7bdff
commit cc52daa63d
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ $pgtitle = array(gettext("Services"), gettext("Captive Portal"), $a_cp[$cpzone][
$pglinks = array("", "services_captiveportal_zones.php", "services_captiveportal.php?zone=" . $cpzone, "@self");
$shortcut_section = "captiveportal";
if ($_POST['act'] == "del" && !empty($cpzone) && isset($cpzoneid)) {
if ($_POST['act'] == "del" && !empty($cpzone)) {
$a_allowedhostnames =& $a_cp[$cpzone]['allowedhostname'];
if ($a_allowedhostnames[$_POST['id']]) {
$ipent = $a_allowedhostnames[$_POST['id']];

View File

@ -60,7 +60,7 @@ $pgtitle = array(gettext("Services"), gettext("Captive Portal"), $a_cp[$cpzone][
$pglinks = array("", "services_captiveportal_zones.php", "services_captiveportal.php?zone=" . $cpzone, "@self");
$shortcut_section = "captiveportal";
if ($_POST['act'] == "del" && !empty($cpzone) && isset($cpzoneid)) {
if ($_POST['act'] == "del" && !empty($cpzone)) {
$a_allowedips =& $config['captiveportal'][$cpzone]['allowedip'];
if ($a_allowedips[$_POST['id']]) {