summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-10-28 17:14:30 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-10-28 17:14:30 +0000
commit4b7aee98dec85825b9a32b11895e32f313d8aab2 (patch)
tree7bdfd56be5db701cde2f770b6bc16d4e3b3d7757 /usr
parent182fa1201a3d8e5973b7c2fa9232e67a4fb1ff07 (diff)
downloadpfsense-4b7aee98dec85825b9a32b11895e32f313d8aab2.zip
pfsense-4b7aee98dec85825b9a32b11895e32f313d8aab2.tar.gz
Alert when no gateways are set
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/system_gateway_groups_edit.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/usr/local/www/system_gateway_groups_edit.php b/usr/local/www/system_gateway_groups_edit.php
index 18c61c0..d16315b 100755
--- a/usr/local/www/system_gateway_groups_edit.php
+++ b/usr/local/www/system_gateway_groups_edit.php
@@ -78,13 +78,18 @@ if ($_POST) {
}
/* check for overlaps */
- foreach ($a_gateway_groups as $gateway_group) {
- if (isset($id) && ($a_gateway_groups[$id]) && ($a_gateway_groups[$id] === $gateway_group))
- continue;
-
- if ($gateway_group['name'] == $_POST['name']) {
- $input_errors[] = "A gateway group with this name \"{$_POST['name']}\" already exists.";
- break;
+ if(!$a_gateway_groups)
+ $input_errors[] = "You must setup a gateway first!";
+
+ if($a_gateway_groups) {
+ foreach ($a_gateway_groups as $gateway_group) {
+ if (isset($id) && ($a_gateway_groups[$id]) && ($a_gateway_groups[$id] === $gateway_group))
+ continue;
+
+ if ($gateway_group['name'] == $_POST['name']) {
+ $input_errors[] = "A gateway group with this name \"{$_POST['name']}\" already exists.";
+ break;
+ }
}
}
OpenPOWER on IntegriCloud