diff options
author | Ermal <eri@pfsense.org> | 2010-05-07 10:10:06 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-05-07 10:10:06 +0000 |
commit | f1e7ae165bf6820c94ba739433794df3d13d4a5f (patch) | |
tree | f3df50088d22d8a53765ad35b0fe892871886139 /usr/local/www/system_gateway_groups_edit.php | |
parent | 28955fee05007f9a7f8aa4a189969f675c0690dc (diff) | |
download | pfsense-f1e7ae165bf6820c94ba739433794df3d13d4a5f.zip pfsense-f1e7ae165bf6820c94ba739433794df3d13d4a5f.tar.gz |
Prevent gateway groups of having the same name as a gateway because this is not valid.
Diffstat (limited to 'usr/local/www/system_gateway_groups_edit.php')
-rwxr-xr-x | usr/local/www/system_gateway_groups_edit.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/usr/local/www/system_gateway_groups_edit.php b/usr/local/www/system_gateway_groups_edit.php index a17cd94..a3a8186 100755 --- a/usr/local/www/system_gateway_groups_edit.php +++ b/usr/local/www/system_gateway_groups_edit.php @@ -110,6 +110,9 @@ if ($_POST) { /* we have a priority above 0 (disabled), add item to list */ $pconfig['item'][] = "{$gwname}|{$_POST[$gwname]}"; } + /* check for overlaps */ + if ($_POST['name'] == $gwname) + $input_errors[] = sprintf(gettext('A gateway group cannot have the same name with a gateway "%s" please choose another name.'), $_POST['name']); } if(count($pconfig['item']) == 0) { |