diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/voucher.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc index e4fc23e..56329df 100644 --- a/etc/inc/voucher.inc +++ b/etc/inc/voucher.inc @@ -53,6 +53,7 @@ function xmlrpc_sync_voucher_expire($vouchers, $syncip, $port, $password, $usern /* Construct code that is run on remote machine */ $method = 'pfsense.exec_php'; $execcmd = <<<EOF + global \$cpzone; require_once('/etc/inc/captiveportal.inc'); require_once('/etc/inc/voucher.inc'); \$cpzone = "$cpzone"; @@ -108,6 +109,7 @@ function xmlrpc_sync_voucher_disconnect($dbent, $syncip, $port, $password, $user $tmp_stop_time = (isset($stop_time)) ? $stop_time : "null"; $method = 'pfsense.exec_php'; $execcmd = <<<EOF + global \$cpzone; require_once('/etc/inc/captiveportal.inc'); require_once('/etc/inc/voucher.inc'); \$cpzone = "$cpzone"; @@ -163,6 +165,7 @@ function xmlrpc_sync_used_voucher($voucher_received, $syncip, $port, $password, /* Construct code that is run on remote machine */ $method = 'pfsense.exec_php'; $execcmd = <<<EOF + global \$cpzone; require_once('/etc/inc/voucher.inc'); \$cpzone = "$cpzone"; \$timeleft = voucher_auth("$voucher_received"); @@ -201,7 +204,7 @@ EOF; if (!is_array($config['voucher'])) $config['voucher'] = array(); - if (is_array($toreturn['voucher']) && (count($toreturn['voucher']['roll']) <> count($config['voucher'][$cpzone]['roll']))) { + if (is_array($toreturn['voucher']) && is_array($toreturn['voucher']['roll'])) { $config['voucher'][$cpzone]['roll'] = $toreturn['voucher']['roll']; write_config("Captive Portal Voucher database synchronized with {$url}"); voucher_configure_zone(true); |