summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-12-24 10:00:05 +0000
committerErmal <eri@pfsense.org>2013-12-24 10:00:05 +0000
commit27cea9a385ea9b1df2cc3c23d9e1a619f83b3746 (patch)
treeb79d43ed5ab7714ca7a8a8faf802c3c1132ce4db /etc
parent56301bed301dcbd2e3cd1f9efdd344df59f719b4 (diff)
downloadpfsense-27cea9a385ea9b1df2cc3c23d9e1a619f83b3746.zip
pfsense-27cea9a385ea9b1df2cc3c23d9e1a619f83b3746.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.inc9
1 files changed, 2 insertions, 7 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index 6429156..9531d3d 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -621,12 +621,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;
/*
@@ -1398,7 +1392,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);
OpenPOWER on IntegriCloud