From f3512fca87c1b682f336433d2922de78328bb9ac Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 17 Dec 2013 14:38:31 -0500 Subject: [PATCH] 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(-) diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc index e19e12193f..a2baae98b9 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