From e183e1cee78c3b88b8c276437f9c673fcb2368e9 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 17 Dec 2013 14:38:31 -0500 Subject: Reduce the total minutes by the remote minutes used, do not use the value directly. Otherwise the voucher will be cut short or listed invalid when it otherwise should have time left over. --- etc/inc/voucher.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc/inc/voucher.inc') diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc index e19e121..a2baae9 100644 --- a/etc/inc/voucher.inc +++ b/etc/inc/voucher.inc @@ -438,7 +438,7 @@ function voucher_auth($voucher_received, $test = 0) { // If we did a XMLRPC sync earlier check the timeleft if (!empty($config['voucher'][$cpzone]['vouchersyncdbip'])) if($remote_time_used < $total_minutes) - $total_minutes = $remote_time_used; + $total_minutes -= $remote_time_used; // All given vouchers were valid and this isn't simply a test. // Write back the used DB's -- cgit v1.1