diff options
-rw-r--r-- | src/usr/local/www/interfaces_groups_edit.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/usr/local/www/interfaces_groups_edit.php b/src/usr/local/www/interfaces_groups_edit.php index 1394c69..d215288 100644 --- a/src/usr/local/www/interfaces_groups_edit.php +++ b/src/usr/local/www/interfaces_groups_edit.php @@ -97,11 +97,9 @@ if ($_POST) { do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); if (!$input_errors) { - if (!isset($id)) { - foreach ($a_ifgroups as $groupentry) { - if ($groupentry['ifname'] == $_POST['ifname']) { - $input_errors[] = gettext("Group name already exists!"); - } + foreach ($a_ifgroups as $groupid => $groupentry) { + if ((!isset($id) || ($groupid != $id)) && ($groupentry['ifname'] == $_POST['ifname'])) { + $input_errors[] = gettext("Group name already exists!"); } } |