summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/services_captiveportal_vouchers_edit.php
diff options
context:
space:
mode:
authorLuiz Otavio O Souza <luiz@netgate.com>2015-11-25 07:21:10 -0600
committerLuiz Otavio O Souza <luiz@netgate.com>2015-11-25 07:21:10 -0600
commit916878b2678be45a3ca5e694468993277a8ed2a6 (patch)
tree5126e5945771f154ec95da893152ef58c71c921d /src/usr/local/www/services_captiveportal_vouchers_edit.php
parent919c84863cbf711b9335cf265771ad8a5fe750e6 (diff)
downloadpfsense-916878b2678be45a3ca5e694468993277a8ed2a6.zip
pfsense-916878b2678be45a3ca5e694468993277a8ed2a6.tar.gz
Ignore ourselves when checking for a duplicate roll #.
Fixes the voucher editing.
Diffstat (limited to 'src/usr/local/www/services_captiveportal_vouchers_edit.php')
-rw-r--r--src/usr/local/www/services_captiveportal_vouchers_edit.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/usr/local/www/services_captiveportal_vouchers_edit.php b/src/usr/local/www/services_captiveportal_vouchers_edit.php
index 8fbf69e..13531ae 100644
--- a/src/usr/local/www/services_captiveportal_vouchers_edit.php
+++ b/src/usr/local/www/services_captiveportal_vouchers_edit.php
@@ -130,6 +130,8 @@ if ($_POST) {
// Look for duplicate roll #
foreach ($a_roll as $re) {
+ if (isset($id) && $a_roll[$id] && $a_roll[$id] === $re)
+ continue;
if ($re['number'] == $_POST['number']) {
$input_errors[] = sprintf(gettext("Roll number %s already exists."), $_POST['number']);
break;
OpenPOWER on IntegriCloud