summaryrefslogtreecommitdiffstats
path: root/etc/inc/voucher.inc
diff options
context:
space:
mode:
authorRenato Botelho <renato.botelho@bluepex.com>2010-08-30 08:26:59 -0300
committerRenato Botelho <renato.botelho@bluepex.com>2010-08-30 08:26:59 -0300
commit487caee6a7cb2fa18367f513ca85c990be036a19 (patch)
tree4766e6c42f5108cf0ef91161890e8228723b9a5a /etc/inc/voucher.inc
parent02226b924f58b216b8771d65717d8d3d6b457d76 (diff)
parentdff71b6bbec5575cde975e47c6405b1fcad9c65b (diff)
downloadpfsense-487caee6a7cb2fa18367f513ca85c990be036a19.zip
pfsense-487caee6a7cb2fa18367f513ca85c990be036a19.tar.gz
Merge remote branch 'mainline/master' into inc
Conflicts: etc/inc/interfaces.inc
Diffstat (limited to 'etc/inc/voucher.inc')
-rw-r--r--etc/inc/voucher.inc13
1 files changed, 10 insertions, 3 deletions
diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc
index 29e35c8..6ea0732 100644
--- a/etc/inc/voucher.inc
+++ b/etc/inc/voucher.inc
@@ -145,9 +145,16 @@ function voucher_auth($voucher_received, $test = 0) {
// All given vouchers were valid and this isn't simply a test.
// Write back the used DB's
- if (is_array($bitstring))
- foreach ($bitstring as $roll => $used)
- voucher_write_used_db($roll, base64_encode($used));
+ if (is_array($bitstring)) {
+ foreach ($bitstring as $roll => $used) {
+ if(is_array($used)) {
+ foreach($used as $u)
+ voucher_write_used_db($roll, base64_encode($u));
+ } else {
+ voucher_write_used_db($roll, base64_encode($used));
+ }
+ }
+ }
// Active DB: we only add the first voucher if multiple given
// and give that one all the time credit. This allows the user to logout and
OpenPOWER on IntegriCloud