diff options
Diffstat (limited to 'etc/inc/captiveportal.inc')
-rw-r--r-- | etc/inc/captiveportal.inc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index 0d46fec..1d95971 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -1825,7 +1825,7 @@ function portal_hostname_from_client_ip($cliip) { $ourhostname .= ":" . $listenporthttps; } } else { - $listenporthttp = $cpcfg['listenporthttp'] ? $cpcfg['listenporthttp'] : ($cpcfg['zoneid'] + 8000); + $listenporthttp = $cpcfg['listenporthttp'] ? $cpcfg['listenporthttp'] : ($cpcfg['zoneid'] + 8000); $ifip = portal_ip_from_client_ip($cliip); if (!$ifip) { $ourhostname = "{$config['system']['hostname']}.{$config['system']['domain']}"; @@ -1930,7 +1930,7 @@ function captiveportal_reapply_attributes($cpentry, $attributes) { unset($bw_up_pipeno, $bw_down_pipeno, $bw_up, $bw_down); } -function portal_allow($clientip, $clientmac, $username, $password = null, $attributes = null, $pipeno = null, $radiusctx = null) { +function portal_allow($clientip, $clientmac, $username, $password = null, $attributes = null, $pipeno = null, $radiusctx = null) { global $redirurl, $g, $config, $type, $passthrumac, $_POST, $cpzone, $cpzoneid; // Ensure we create an array if we are missing attributes @@ -2073,9 +2073,9 @@ function portal_allow($clientip, $clientmac, $username, $password = null, $attri } } if ($username == "unauthenticated") { - $mac['descr'] = "Auto-added"; + $mac['descr'] = "Auto-added"; } else { - $mac['descr'] = "Auto-added for user {$username}"; + $mac['descr'] = "Auto-added for user {$username}"; } if (!empty($bw_up)) { $mac['bw_up'] = $bw_up; @@ -2149,7 +2149,7 @@ function portal_allow($clientip, $clientmac, $username, $password = null, $attri /* encode password in Base64 just in case it contains commas */ $bpassword = base64_encode($password); - $insertquery = "INSERT INTO captiveportal (allow_time, pipeno, ip, mac, username, sessionid, bpassword, session_timeout, idle_timeout, session_terminate_time, interim_interval, radiusctx) "; + $insertquery = "INSERT INTO captiveportal (allow_time, pipeno, ip, mac, username, sessionid, bpassword, session_timeout, idle_timeout, session_terminate_time, interim_interval, radiusctx) "; $insertquery .= "VALUES ({$allow_time}, {$pipeno}, '{$clientip}', '{$clientmac}', '{$safe_username}', '{$sessionid}', '{$bpassword}', "; $insertquery .= "{$session_timeout}, {$idle_timeout}, {$session_terminate_time}, {$interim_interval}, '{$radiusctx}')"; |