summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-09-21 13:39:48 -0300
committerRenato Botelho <renato@netgate.com>2015-09-21 13:39:48 -0300
commit6298f87a2497920830dfc43ed425728790915c58 (patch)
tree8f1e484bb7507436fa353bf62dd3722df7a661bc /usr/local
parent45be7ac196310301e9247c748c1a459178b6158e (diff)
parent29736edaf6890c898d4325b14a287614c43fe662 (diff)
downloadpfsense-6298f87a2497920830dfc43ed425728790915c58.zip
pfsense-6298f87a2497920830dfc43ed425728790915c58.tar.gz
Merge pull request #1923 from phil-davis/patch-5
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index ded7a85..2455d65 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -146,12 +146,10 @@ if ($_POST) {
$input_errors[] = gettext("The alias name must be less than 32 characters long, may not consist of only numbers, and may only contain the following characters") . " a-z, A-Z, 0-9, _.";
}
/* 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