summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-03-28 15:43:09 +0545
committerPhil Davis <phil.davis@inf.org>2017-03-28 15:43:09 +0545
commitd61ca1d9665606521cbdbed9fc6859e73b485c1b (patch)
tree427aec288136f5df284d5a0008ac448dc890d8b2 /src
parentd0eb6d49cd8008573bab31d2eb2534488ebc9cfc (diff)
downloadpfsense-d61ca1d9665606521cbdbed9fc6859e73b485c1b.zip
pfsense-d61ca1d9665606521cbdbed9fc6859e73b485c1b.tar.gz
Redmine #7435 Fix edit problems due to POST id code
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/services_captiveportal_vouchers_edit.php2
-rw-r--r--src/usr/local/www/services_dnsmasq_domainoverride_edit.php2
-rw-r--r--src/usr/local/www/services_dnsmasq_edit.php16
-rw-r--r--src/usr/local/www/services_unbound_host_edit.php15
4 files changed, 22 insertions, 13 deletions
diff --git a/src/usr/local/www/services_captiveportal_vouchers_edit.php b/src/usr/local/www/services_captiveportal_vouchers_edit.php
index f502dcf..289c562 100644
--- a/src/usr/local/www/services_captiveportal_vouchers_edit.php
+++ b/src/usr/local/www/services_captiveportal_vouchers_edit.php
@@ -212,7 +212,7 @@ if (isset($id) && $a_roll[$id]) {
'id',
null,
'hidden',
- $pconfig['id']
+ $id
));
}
diff --git a/src/usr/local/www/services_dnsmasq_domainoverride_edit.php b/src/usr/local/www/services_dnsmasq_domainoverride_edit.php
index 77001af..c558bd2 100644
--- a/src/usr/local/www/services_dnsmasq_domainoverride_edit.php
+++ b/src/usr/local/www/services_dnsmasq_domainoverride_edit.php
@@ -163,7 +163,7 @@ if (isset($id) && $a_domainOverrides[$id]) {
'id',
null,
'hidden',
- $pconfig['id']
+ $id
));
}
diff --git a/src/usr/local/www/services_dnsmasq_edit.php b/src/usr/local/www/services_dnsmasq_edit.php
index b476052..a11c259 100644
--- a/src/usr/local/www/services_dnsmasq_edit.php
+++ b/src/usr/local/www/services_dnsmasq_edit.php
@@ -131,11 +131,15 @@ if ($_POST['save']) {
}
if (($hostent['host'] == $_POST['host']) &&
- ($hostent['domain'] == $_POST['domain']) &&
- ((is_ipaddrv4($hostent['ip']) && is_ipaddrv4($_POST['ip'])) ||
- (is_ipaddrv6($hostent['ip']) && is_ipaddrv6($_POST['ip'])))) {
- $input_errors[] = gettext("This host/domain already exists.");
- break;
+ ($hostent['domain'] == $_POST['domain'])) {
+ if (is_ipaddrv4($hostent['ip']) && is_ipaddrv4($_POST['ip'])) {
+ $input_errors[] = gettext("This host/domain override combination already exists with an IPv4 address.");
+ break;
+ }
+ if (is_ipaddrv6($hostent['ip']) && is_ipaddrv6($_POST['ip'])) {
+ $input_errors[] = gettext("This host/domain override combination already exists with an IPv6 address.");
+ break;
+ }
}
}
@@ -228,7 +232,7 @@ if (isset($id) && $a_hosts[$id]) {
'id',
null,
'hidden',
- $pconfig['id']
+ $id
));
}
diff --git a/src/usr/local/www/services_unbound_host_edit.php b/src/usr/local/www/services_unbound_host_edit.php
index a5fcd3d..e766204 100644
--- a/src/usr/local/www/services_unbound_host_edit.php
+++ b/src/usr/local/www/services_unbound_host_edit.php
@@ -142,10 +142,15 @@ if ($_POST['save']) {
}
if (($hostent['host'] == $_POST['host']) &&
- ($hostent['domain'] == $_POST['domain']) &&
- ((is_ipaddrv4($hostent['ip']) && is_ipaddrv4($_POST['ip'])) || (is_ipaddrv6($hostent['ip']) && is_ipaddrv6($_POST['ip'])))) {
- $input_errors[] = gettext("This host/domain already exists.");
- break;
+ ($hostent['domain'] == $_POST['domain'])) {
+ if (is_ipaddrv4($hostent['ip']) && is_ipaddrv4($_POST['ip'])) {
+ $input_errors[] = gettext("This host/domain override combination already exists with an IPv4 address.");
+ break;
+ }
+ if (is_ipaddrv6($hostent['ip']) && is_ipaddrv6($_POST['ip'])) {
+ $input_errors[] = gettext("This host/domain override combination already exists with an IPv6 address.");
+ break;
+ }
}
}
@@ -221,7 +226,7 @@ if (isset($id) && $a_hosts[$id]) {
'id',
null,
'hidden',
- $pconfig['id']
+ $id
));
}
OpenPOWER on IntegriCloud