diff options
author | Ermal <eri@pfsense.org> | 2011-05-25 11:02:53 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-05-25 11:02:53 +0000 |
commit | f6f1c8474875e91cf297abf28e2fad65ea6152f7 (patch) | |
tree | 28556120521e5299a9ae79a5cafb5e913e11f195 /etc/inc/voucher.inc | |
parent | b7475a811cf4620112673dc78c5d0afacb4a38c1 (diff) | |
download | pfsense-f6f1c8474875e91cf297abf28e2fad65ea6152f7.zip pfsense-f6f1c8474875e91cf297abf28e2fad65ea6152f7.tar.gz |
Update some code to be more readble and more compliant to php5
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 ec59716..8d41e05 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']); |