summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-09-21 13:39:59 -0300
committerRenato Botelho <renato@netgate.com>2015-09-21 13:39:59 -0300
commit5f9a3a20ba7905b0ca76a969d39ef5d03d523702 (patch)
treea0d084e5234be4f5d4f06b6de60536e82fc3d477 /src
parent580268189d1429bca44b8685eb3f6c326a811c5b (diff)
parentea85a0ce78a9d254637c16507b3e0cad7fc3b695 (diff)
downloadpfsense-5f9a3a20ba7905b0ca76a969d39ef5d03d523702.zip
pfsense-5f9a3a20ba7905b0ca76a969d39ef5d03d523702.tar.gz
Merge pull request #1924 from phil-davis/patch-6
Diffstat (limited to 'src')
-rwxr-xr-xsrc/usr/local/www/firewall_aliases_edit.php10
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;
}
}
OpenPOWER on IntegriCloud