diff options
author | Ermal <eri@pfsense.org> | 2012-08-01 08:02:06 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-08-01 08:02:06 +0000 |
commit | 25fff26736ea57851b8622ecc910def3a7d37971 (patch) | |
tree | 3552ab2d5ecb93eaa52e5849132be512fffed16c /etc/inc/system.inc | |
parent | 8b34498c90b14d5f67c2abfe062f462baabc8b7e (diff) | |
download | pfsense-25fff26736ea57851b8622ecc910def3a7d37971.zip pfsense-25fff26736ea57851b8622ecc910def3a7d37971.tar.gz |
Refine test
Diffstat (limited to 'etc/inc/system.inc')
-rw-r--r-- | etc/inc/system.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index b7779be..cbd7361 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -843,10 +843,10 @@ function system_generate_lighty_config($filename, $captive_portal_rewrite = "url.rewrite-once = ( \"(.*captiveportal.*)\" => \"$1\", \"(.*)\" => \"/index.php?zone={$captive_portal}&redirurl=$1\" )\n"; $captive_portal_module = ""; $maxprocperip = $config['captiveportal'][$captive_portal]['maxprocperip']; - if($maxprocperip and $maxprocperip > 0) - $captive_portal_mod_evasive = "evasive.max-conns-per-ip = {$maxprocperip}"; - else + if(empty($maxprocperip)) $captive_portal_mod_evasive = ""; + else + $captive_portal_mod_evasive = "evasive.max-conns-per-ip = {$maxprocperip}"; $server_upload_dirs = "server.upload-dirs = ( \"{$g['tmp_path']}/captiveportal/\" )\n"; exec("mkdir -p {$g['tmp_path']}/captiveportal"); exec("chmod a-w {$g['tmp_path']}/captiveportal"); |