diff options
author | Ermal LUÇI <eri@pfsense.org> | 2015-01-12 21:01:29 +0100 |
---|---|---|
committer | Ermal LUÇI <eri@pfsense.org> | 2015-01-12 21:01:29 +0100 |
commit | b8632324416aa319e9055cc67958eb214b2e7f0a (patch) | |
tree | 4c3c80d8e45f1990801ca7a9e18559a6490cbcac /usr/local/www | |
parent | 41196b69e5fe08498acb77c246c35d62a623a8be (diff) | |
download | pfsense-b8632324416aa319e9055cc67958eb214b2e7f0a.zip pfsense-b8632324416aa319e9055cc67958eb214b2e7f0a.tar.gz |
Improve this part as well
Diffstat (limited to 'usr/local/www')
-rw-r--r-- | usr/local/www/services_captiveportal_mac.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/usr/local/www/services_captiveportal_mac.php b/usr/local/www/services_captiveportal_mac.php index a73d2d1..b7358d2 100644 --- a/usr/local/www/services_captiveportal_mac.php +++ b/usr/local/www/services_captiveportal_mac.php @@ -72,17 +72,16 @@ if ($_POST) { $retval = 0; if (is_array($a_cp[$cpzone]['passthrumac'])) { - if (count($a_cp[$cpzone]['passthrumac']) > 2000) - set_time_limit(0); $cpzoneid = $a_cp[$cpzone]['cpzoneid']; $rules = captiveportal_passthrumac_configure(); - @file_put_contents("{$g['tmp_path']}/passthrumac_gui", $rules); - mwexec("/sbin/ipfw -x {$cpzoneid} {$g['tmp_path']}/passthrumac_gui"); + if (!empty($rules)) { + @file_put_contents("{$g['tmp_path']}/passthrumac_gui", $rules); + mwexec("/sbin/ipfw -x {$cpzoneid} {$g['tmp_path']}/passthrumac_gui"); + @unlink("{$g['tmp_path']}/passthrumac_gui"); + } $savemsg = get_std_save_message($retval); if ($retval == 0) clear_subsystem_dirty('passthrumac'); - @unlink("{$g['tmp_path']}/passthrumac_gui"); - set_time_limit(900); } } |