diff options
author | Vinicius Coque <vinicius.coque@bluepex.com> | 2011-05-25 14:35:40 -0300 |
---|---|---|
committer | Vinicius Coque <vinicius.coque@bluepex.com> | 2011-05-25 14:35:40 -0300 |
commit | 669113f9d12a43391cd480390dfbfbecf55d544e (patch) | |
tree | e80e743ca3b885a272485d02ad06712ef62aec5d /etc/inc/voucher.inc | |
parent | 19bd7032b2c35e60ea505220e696d69659452d92 (diff) | |
parent | dceff62e8144b56cb292e1a3fd69abe307072625 (diff) | |
download | pfsense-669113f9d12a43391cd480390dfbfbecf55d544e.zip pfsense-669113f9d12a43391cd480390dfbfbecf55d544e.tar.gz |
Merge remote-tracking branch 'mainline/master' into inc
Diffstat (limited to 'etc/inc/voucher.inc')
-rw-r--r-- | etc/inc/voucher.inc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc index 3b9f1ba..f7f5b01 100644 --- a/etc/inc/voucher.inc +++ b/etc/inc/voucher.inc @@ -164,8 +164,7 @@ function voucher_auth($voucher_received, $test = 0) { $tickets_per_roll = array(); $minutes_per_roll = array(); if (is_array($config['voucher']['roll'])) { - $a_roll = &$config['voucher']['roll']; - foreach ($a_roll as $rollent) { + foreach ($config['voucher']['roll'] as $rollent) { $tickets_per_roll[$rollent['number']] = $rollent['count']; $minutes_per_roll[$rollent['number']] = $rollent['minutes']; } @@ -192,7 +191,7 @@ function voucher_auth($voucher_received, $test = 0) { list($status, $roll, $nr) = explode(" ", $result); if ($status == "OK") { if (!$first_voucher) { - // store first voucher. Thats the one we give the timecredit + // store first voucher. Thats the one we give the timecredit $first_voucher = $voucher; $first_voucher_roll = $roll; } @@ -352,11 +351,10 @@ function voucher_configure($sync = false) { if (($g['booting'] || $sync == true) && is_array($config['voucher']['roll'])) { - // create active and used DB per roll on ramdisk from config - $a_roll = &$config['voucher']['roll']; $voucherlck = lock('voucher', LOCK_EX); - foreach ($a_roll as $rollent) { + // create active and used DB per roll on ramdisk from config + foreach ($config['voucher']['roll'] as $rollent) { $roll = $rollent['number']; voucher_write_used_db($roll, $rollent['used']); |