diff options
author | Phil Davis <phil.davis@inf.org> | 2014-09-26 08:25:41 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2014-09-26 08:25:41 +0545 |
commit | 62218b4dc41723f313350a5d4152c98f4a1c6d80 (patch) | |
tree | d39475feec8ebf6ce8ef7e634e8fa88330b48be1 /usr/local/www/firewall_aliases_edit.php | |
parent | 7ea27b0d8bb7e321420e86f90f5bcb92dadd9608 (diff) | |
download | pfsense-62218b4dc41723f313350a5d4152c98f4a1c6d80.zip pfsense-62218b4dc41723f313350a5d4152c98f4a1c6d80.tar.gz |
Remove useless check for alias description matching an interface description
While looking at other checks in the code I noticed this check. It was not effective anyway, because the first line inside "if ($_POST)" below does
unset($input_errors);
which undoes this check anyway.
In any case the check is not relevant. For example I might have interface WAN with description (which is really the alternate/display name for an interface) as MYISP.
I cannot also have an Alias with name MYISP - that is checked for already later in the code.
But I can have an Alias with description MYISP - in the case of an Alias the description really is just helpful text for the user, it is the name that really counts for use in the pf configuration.
So the code is not needed.
Diffstat (limited to 'usr/local/www/firewall_aliases_edit.php')
-rwxr-xr-x | usr/local/www/firewall_aliases_edit.php | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index 8931edc..2b375ec 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -107,12 +107,6 @@ if (isset($id) && $a_aliases[$id]) { $pconfig['type'] = $a_aliases[$id]['type']; $pconfig['descr'] = html_entity_decode($a_aliases[$id]['descr']); - /* interface list */ - $iflist = get_configured_interface_with_descr(false, true); - foreach ($iflist as $if => $ifdesc) - if($ifdesc == $pconfig['descr']) - $input_errors[] = sprintf(gettext("Sorry, an interface is already named %s."), $pconfig['descr']); - if(preg_match("/urltable/i", $a_aliases[$id]['type'])) { $pconfig['address'] = $a_aliases[$id]['url']; $pconfig['updatefreq'] = $a_aliases[$id]['updatefreq']; |