From 451ec561a24bd0fc8f718a93584e06ca9281a05c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=E7i?= Date: Thu, 11 Feb 2010 15:00:52 +0000 Subject: Ticket #351. Prevent wrong config.xml creation. --- etc/inc/voucher.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'etc/inc/voucher.inc') diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc index b348fc1..1cd4679 100644 --- a/etc/inc/voucher.inc +++ b/etc/inc/voucher.inc @@ -390,12 +390,14 @@ function voucher_save_db_to_config() { $rollent['used'] = base64_encode($bitmask); $active_vouchers = voucher_read_active_db($roll); $db = array(); + $dbi = 1; foreach($active_vouchers as $voucher => $line) { list($timestamp,$minutes) = explode(",", $line); $activent['voucher'] = $voucher; $activent['timestamp'] = $timestamp; $activent['minutes'] = $minutes; - $db[] = $activent; + $db["v{$dbi}"] = $activent; + $dbi++; } $rollent['active'] = $db; } -- cgit v1.1