diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-11-25 05:04:11 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-11-25 05:04:11 +0000 |
commit | ea6b6d7f4eff01e788ec762763ed3d1c9a82cceb (patch) | |
tree | bba79cd902f5bb793b5dea430b05922f7d70c563 /usr/local/www/system_gateways_edit.php | |
parent | a6508e3579986eb19106975a1213f0245ff7fc6f (diff) | |
download | pfsense-ea6b6d7f4eff01e788ec762763ed3d1c9a82cceb.zip pfsense-ea6b6d7f4eff01e788ec762763ed3d1c9a82cceb.tar.gz |
Do not allow duplicate gateway names
Diffstat (limited to 'usr/local/www/system_gateways_edit.php')
-rwxr-xr-x | usr/local/www/system_gateways_edit.php | 5 |
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."; } |