summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_gateways_edit.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-11-25 05:04:11 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-11-25 05:04:11 +0000
commitea6b6d7f4eff01e788ec762763ed3d1c9a82cceb (patch)
treebba79cd902f5bb793b5dea430b05922f7d70c563 /usr/local/www/system_gateways_edit.php
parenta6508e3579986eb19106975a1213f0245ff7fc6f (diff)
downloadpfsense-ea6b6d7f4eff01e788ec762763ed3d1c9a82cceb.zip
pfsense-ea6b6d7f4eff01e788ec762763ed3d1c9a82cceb.tar.gz
Do not allow duplicate gateway names
Diffstat (limited to 'usr/local/www/system_gateways_edit.php')
-rwxr-xr-xusr/local/www/system_gateways_edit.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php
index 6297e15..e6b80e8 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -75,6 +75,11 @@ if ($_POST) {
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
+ /* Does this gateway name already exist? */
+ foreach($config['gateways']['gateway_item'] as $gw)
+ if($gw['name'] == $_POST['name'])
+ $input_errors[] = "This gateway name already exists.";
+
if (! isset($_POST['name'])) {
$input_errors[] = "A valid gateway name must be specified.";
}
OpenPOWER on IntegriCloud