summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_captiveportal_vouchers.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-01-21 21:17:53 +0000
committerErmal <eri@pfsense.org>2013-01-21 21:17:53 +0000
commit4fb2e5ed4755fc0077ca96d80d7430ce85c26867 (patch)
treed6d212bf605765da446bd8c6ae9eb3f08e289dcb /usr/local/www/services_captiveportal_vouchers.php
parent09294e847f1216b843d7199b611428adcf5072e4 (diff)
downloadpfsense-4fb2e5ed4755fc0077ca96d80d7430ce85c26867.zip
pfsense-4fb2e5ed4755fc0077ca96d80d7430ce85c26867.tar.gz
If entering an action take the redir and exit even though the action was not successful to avoid any issue
Diffstat (limited to 'usr/local/www/services_captiveportal_vouchers.php')
-rw-r--r--usr/local/www/services_captiveportal_vouchers.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr/local/www/services_captiveportal_vouchers.php b/usr/local/www/services_captiveportal_vouchers.php
index 5158709..15624b0 100644
--- a/usr/local/www/services_captiveportal_vouchers.php
+++ b/usr/local/www/services_captiveportal_vouchers.php
@@ -142,9 +142,9 @@ if ($_GET['act'] == "del") {
voucher_unlink_db($roll);
unlock($voucherlck);
write_config();
- header("Location: services_captiveportal_vouchers.php?zone={$cpzone}");
- exit;
}
+ header("Location: services_captiveportal_vouchers.php?zone={$cpzone}");
+ exit;
}
/* print all vouchers of the selected roll */
else if ($_GET['act'] == "csv") {
@@ -166,9 +166,10 @@ else if ($_GET['act'] == "csv") {
header("Content-Disposition: attachment; filename=vouchers_{$cpzone}_roll{$number}.csv");
if (file_exists("{$g['varetc_path']}/voucher_{$cpzone}.cfg"))
system("/usr/local/bin/voucher -c {$g['varetc_path']}/voucher_{$cpzone}.cfg -p {$g['varetc_path']}/voucher_{$cpzone}.private $number $count");
- unlink("{$g['varetc_path']}/voucher_{$cpzone}.private");
- exit;
- }
+ @unlink("{$g['varetc_path']}/voucher_{$cpzone}.private");
+ } else
+ header("Location: services_captiveportal_vouchers.php?zone={$cpzone}");
+ exit;
}
} else {
$input_errors[] = gettext("Need private RSA key to print vouchers") . "\n";
OpenPOWER on IntegriCloud