summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_gateways_edit.php
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2009-12-18 13:16:58 +0100
committerSeth Mos <seth.mos@xs4all.nl>2009-12-18 13:16:58 +0100
commite9df576978ea476730c155c14db742f0ea21e775 (patch)
tree5fa8b985b0b1508cc5736ceb228815074a88d409 /usr/local/www/system_gateways_edit.php
parent85b14810eaefc86272f11fd885f4b282af37d654 (diff)
downloadpfsense-e9df576978ea476730c155c14db742f0ea21e775.zip
pfsense-e9df576978ea476730c155c14db742f0ea21e775.tar.gz
Do no throw a duplicate IP address warning when creating a new entry from a existing gateway which was previously a
automatically added gateway entry. - clarify comment message
Diffstat (limited to 'usr/local/www/system_gateways_edit.php')
-rwxr-xr-xusr/local/www/system_gateways_edit.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php
index 60aa1b4..5f169d1 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -110,15 +110,15 @@ if ($_POST) {
if (isset($id) && ($a_gateways[$id]) && ($a_gateways[$id] === $gateway))
continue;
- if (($gateway['name'] <> "") && (in_array($_POST['name'], $gateway))) {
+ if (($gateway['name'] <> "") && (in_array($_POST['name'], $gateway)) && ($gateway['attribute'] != "system")) {
$input_errors[] = "The gateway name \"{$_POST['name']}\" already exists.";
break;
}
- if (($gateway['gateway'] <> "") && (in_array($_POST['gateway'], $gateway))) {
+ if (($gateway['gateway'] <> "") && (in_array($_POST['gateway'], $gateway)) && ($gateway['attribute'] != "system")) {
$input_errors[] = "The gateway IP address \"{$_POST['gateway']}\" already exists.";
break;
}
- if (($gateway['monitor'] <> "") && (in_array($_POST['monitor'], $gateway))) {
+ if (($gateway['monitor'] <> "") && (in_array($_POST['monitor'], $gateway)) && ($gateway['attribute'] != "system")) {
$input_errors[] = "The monitor IP address \"{$_POST['monitor']}\" is already in use. You must choose a different monitor IP.";
break;
}
@@ -190,7 +190,8 @@ include("head.inc");
<?php if ($input_errors) print_input_errors($input_errors); ?>
<form action="system_gateways_edit.php" method="post" name="iform" id="iform">
<?php
- /* If this is a automatically added system gateway we need this var */
+
+ /* If this is a system gateway we need this var */
if(($pconfig['attribute'] == "system") || is_numeric($pconfig['attribute'])) {
echo "<input type='hidden' name='attribute' id='attribute' value='{$pconfig['attribute']}' >\n";
}
OpenPOWER on IntegriCloud