summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-10-17 21:07:47 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-10-17 21:07:47 +0000
commit93008d1b8af956f99f6b8f34f2e8540e1f8ff81a (patch)
treebf7dd4bfce9e22a7176e8c8f0f6fc7e1b48ea477 /usr
parentade453e1520cc6773dcdf9c70922a935fa4f8caf (diff)
downloadpfsense-93008d1b8af956f99f6b8f34f2e8540e1f8ff81a.zip
pfsense-93008d1b8af956f99f6b8f34f2e8540e1f8ff81a.tar.gz
Unset items which are false
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/services_captiveportal.php36
1 files changed, 30 insertions, 6 deletions
diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php
index 4da9be9..41fbccd 100755
--- a/usr/local/www/services_captiveportal.php
+++ b/usr/local/www/services_captiveportal.php
@@ -113,22 +113,46 @@ if ($_POST) {
$config['captiveportal']['interface'] = $_POST['cinterface'];
$config['captiveportal']['timeout'] = $_POST['timeout'];
$config['captiveportal']['idletimeout'] = $_POST['idletimeout'];
- $config['captiveportal']['enable'] = $_POST['enable'] ? true : false;
$config['captiveportal']['auth_method'] = $_POST['auth_method'];
- $config['captiveportal']['radacct_enable'] = $_POST['radacct_enable'] ? true : false;
- $config['captiveportal']['reauthenticate'] = $_POST['reauthenticate'] ? true : false;
$config['captiveportal']['reauthenticateacct'] = $_POST['reauthenticateacct'];
- $config['captiveportal']['httpslogin'] = $_POST['httpslogin_enable'] ? true : false;
$config['captiveportal']['httpsname'] = $_POST['httpsname'];
$config['captiveportal']['certificate'] = base64_encode($_POST['cert']);
$config['captiveportal']['private-key'] = base64_encode($_POST['key']);
- $config['captiveportal']['logoutwin_enable'] = $_POST['logoutwin_enable'] ? true : false;
- $config['captiveportal']['nomacfilter'] = $_POST['nomacfilter'] ? true : false;
$config['captiveportal']['redirurl'] = $_POST['redirurl'];
$config['captiveportal']['radiusip'] = $_POST['radiusip'];
$config['captiveportal']['radiusport'] = $_POST['radiusport'];
$config['captiveportal']['radiusacctport'] = $_POST['radiusacctport'];
$config['captiveportal']['radiuskey'] = $_POST['radiuskey'];
+
+ if($_POST['radacct_enable'] == "yes")
+ $config['captiveportal']['radacct_enable'] = true;
+ else
+ unset($config['captiveportal']['radacct_enable']);
+
+ if($_POST['reauthenticate'] == "yes")
+ $config['captiveportal']['reauthenticate'] = true;
+ else
+ unset($config['captiveportal']['reauthenticate']);
+
+ if($_POST['enable'] == "yes")
+ $config['captiveportal']['enable'] = true;
+ else
+ unset($config['captiveportal']['enable']);
+
+ if($_POST['httpslogin_enable'] == "yes")
+ $config['captiveportal']['httpslogin'] = true;
+ else
+ unset($config['captiveportal']['httpslogin']);
+
+ if($_POST['logoutwin_enable'] == "yes")
+ $config['captiveportal']['logoutwin_enable'] = true;
+ else
+ unset($config['captiveportal']['logoutwin_enable']);
+
+ if($_POST['nomacfilter'] == "yes")
+ $config['captiveportal']['nomacfilter'] = true;
+ else
+ unset($config['captiveportal']['nomacfilter']);
/* file upload? */
if (is_uploaded_file($_FILES['htmlfile']['tmp_name']))
OpenPOWER on IntegriCloud