diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-05-17 21:29:16 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-05-17 21:29:16 +0000 |
commit | e47c266d49cc1f77d6ab06904e500f1d85688ace (patch) | |
tree | 82bd3baf80d704993c381b562f268d65a9140a9c /usr | |
parent | 593aa0ad63c6b596ab048902d4a6ecd99b5ccc23 (diff) | |
download | pfsense-e47c266d49cc1f77d6ab06904e500f1d85688ace.zip pfsense-e47c266d49cc1f77d6ab06904e500f1d85688ace.tar.gz |
Ticket #1711 fixes
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/firewall_aliases_edit.php | 6 | ||||
-rwxr-xr-x | usr/local/www/interfaces_opt.php | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index 05dafec..402fd87 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -50,7 +50,11 @@ if (isset($id) && $a_aliases[$id]) { $pconfig['detail'] = $a_aliases[$id]['detail']; $pconfig['address'] = $a_aliases[$id]['address']; $pconfig['descr'] = html_entity_decode($a_aliases[$id]['descr']); - + + for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) + if($config['interfaces']['opt' . $i]['descr'] == $pconfig['descr']) + $input_errors[] = "Sorry, an interface is already named {$pconfig['descr']}."; + $addresses = explode(' ', $pconfig['address']); $address = explode("/", $addresses[0]); if ($address[1]) diff --git a/usr/local/www/interfaces_opt.php b/usr/local/www/interfaces_opt.php index f40d7c5..d47664c 100755 --- a/usr/local/www/interfaces_opt.php +++ b/usr/local/www/interfaces_opt.php @@ -55,6 +55,10 @@ $a_gateways = &$config['gateways']['gateway_item']; $optcfg = &$config['interfaces']['opt' . $index]; $optcfg['descr'] = remove_bad_chars($optcfg['descr']); +foreach($config['aliases']['alias'] as $alias) + if($alias['name'] == $optcfg['descr']) + $input_errors[] = gettext("Sorry, an alias with the name {$optcfg['descr']} already exists."); + $pconfig['descr'] = $optcfg['descr']; $pconfig['bridge'] = $optcfg['bridge']; |