From cc52daa63deb98f6fbcd5edbc24fc65b62eabbec Mon Sep 17 00:00:00 2001 From: Stephen Jones Date: Thu, 7 Jun 2018 14:20:07 -0500 Subject: [PATCH] Allow hostname/ip to be deleted if the captive portal is not enabled --- src/usr/local/www/services_captiveportal_hostname.php | 2 +- src/usr/local/www/services_captiveportal_ip.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/usr/local/www/services_captiveportal_hostname.php b/src/usr/local/www/services_captiveportal_hostname.php index 2d1409b53f..9372df7669 100644 --- a/src/usr/local/www/services_captiveportal_hostname.php +++ b/src/usr/local/www/services_captiveportal_hostname.php @@ -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']]; diff --git a/src/usr/local/www/services_captiveportal_ip.php b/src/usr/local/www/services_captiveportal_ip.php index f53efd7910..d55a8d31aa 100644 --- a/src/usr/local/www/services_captiveportal_ip.php +++ b/src/usr/local/www/services_captiveportal_ip.php @@ -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']]) {