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.

This commit is contained in:
jim-p 2013-12-17 14:38:31 -05:00
parent 1848a25e0b
commit f3512fca87

View File

@ -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