mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Do not allow duplicate gateway names
This commit is contained in:
parent
a6508e3579
commit
ea6b6d7f4e
@ -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.";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user