diff options
author | Renato Botelho <renato@netgate.com> | 2015-09-21 13:39:59 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-09-21 13:39:59 -0300 |
commit | 5f9a3a20ba7905b0ca76a969d39ef5d03d523702 (patch) | |
tree | a0d084e5234be4f5d4f06b6de60536e82fc3d477 /src | |
parent | 580268189d1429bca44b8685eb3f6c326a811c5b (diff) | |
parent | ea85a0ce78a9d254637c16507b3e0cad7fc3b695 (diff) | |
download | pfsense-5f9a3a20ba7905b0ca76a969d39ef5d03d523702.zip pfsense-5f9a3a20ba7905b0ca76a969d39ef5d03d523702.tar.gz |
Merge pull request #1924 from phil-davis/patch-6
Diffstat (limited to 'src')
-rwxr-xr-x | src/usr/local/www/firewall_aliases_edit.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/usr/local/www/firewall_aliases_edit.php b/src/usr/local/www/firewall_aliases_edit.php index 9f918f8..7e6a892 100755 --- a/src/usr/local/www/firewall_aliases_edit.php +++ b/src/usr/local/www/firewall_aliases_edit.php @@ -182,12 +182,10 @@ if ($_POST) { } } /* check for name conflicts */ - if (empty($a_aliases[$id])) { - foreach ($a_aliases as $alias) { - if ($alias['name'] == $_POST['name']) { - $input_errors[] = gettext("An alias with this name already exists."); - break; - } + foreach ($a_aliases as $key => $alias) { + if (($alias['name'] == $_POST['name']) && (empty($a_aliases[$id]) || ($key != $id))) { + $input_errors[] = gettext("An alias with this name already exists."); + break; } } |