diff options
author | Ermal <eri@pfsense.org> | 2013-12-24 10:00:05 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-12-24 10:34:15 +0000 |
commit | a2a42c72f45091d19046d65239c1edf7f377f7f0 (patch) | |
tree | 9cf5bca6ed66b90f3083b42c76be9eafedec37a6 /etc | |
parent | 9172982d9519780c6f46d5383aa7f3cd0b066a3c (diff) | |
download | pfsense-a2a42c72f45091d19046d65239c1edf7f377f7f0.zip pfsense-a2a42c72f45091d19046d65239c1edf7f377f7f0.tar.gz |
Remove not relevant comment now. Also make the operation clear to avoid priority issues.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/captiveportal.inc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index 7343010..211bcf3 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -632,12 +632,6 @@ function captiveportal_prune_old() { /* NOTE: while this can be simplified in non radius case keep as is for now */ $cpdb = captiveportal_read_db(); - /* - * To make sure we iterate over ALL accounts on every run the count($cpdb) is moved - * outside of the loop. Otherwise the loop would evaluate count() on every iteration - * and since $i would increase and count() would decrement they would meet before we - * had a chance to iterate over all accounts. - */ $unsetindexes = array(); $voucher_needs_sync = false; /* @@ -1437,7 +1431,8 @@ function captiveportal_free_dn_ruleno($ruleno) { if (file_exists("{$g['vardb_path']}/captiveportaldn.rules")) { $rules = unserialize(file_get_contents("{$g['vardb_path']}/captiveportaldn.rules")); $rules[$ruleno] = false; - $rules[++$ruleno] = false; + $ruleno++; + $rules[$ruleno] = false; file_put_contents("{$g['vardb_path']}/captiveportaldn.rules", serialize($rules)); } unlock($cpruleslck); |