diff options
author | Renato Botelho <renato@netgate.com> | 2016-01-18 16:09:41 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-01-18 16:09:41 -0200 |
commit | 814e91ece98bfc5ca5cbcf048d9c20e1e02d7dc8 (patch) | |
tree | b8636872adfd5efa6f82d370a48a2310fa4d7e03 /src/usr | |
parent | 0241c58699c61969622f0bfcce37ea72c1f6cd26 (diff) | |
parent | 7d5b2133856a2e4530b09689331f79ce938a24c3 (diff) | |
download | pfsense-814e91ece98bfc5ca5cbcf048d9c20e1e02d7dc8.zip pfsense-814e91ece98bfc5ca5cbcf048d9c20e1e02d7dc8.tar.gz |
Merge pull request #2466 from phil-davis/patch-5
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/local/www/interfaces.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php index 0d82dd5..3a7e85c 100644 --- a/src/usr/local/www/interfaces.php +++ b/src/usr/local/www/interfaces.php @@ -540,6 +540,16 @@ if ($_POST['apply']) { break; } } + + /* Is the description already used as an alias name? */ + if (is_array($config['aliases']['alias'])) { + foreach ($config['aliases']['alias'] as $alias) { + if ($alias['name'] == $_POST['descr']) { + $input_errors[] = sprintf(gettext("Sorry, an alias with the name %s already exists."), $_POST['descr']); + } + } + } + if (is_numeric($_POST['descr'])) { $input_errors[] = gettext("The interface description cannot contain only numbers."); } @@ -1630,7 +1640,7 @@ foreach ($mediaopts as $mediaopt) { } } -$pgtitle = array(gettext("Interfaces"), $pconfig['descr']); +$pgtitle = array(gettext("Interfaces"), $wancfg['descr']); $shortcut_section = "interfaces"; $types4 = array("none" => gettext("None"), "staticv4" => gettext("Static IPv4"), "dhcp" => gettext("DHCP"), "ppp" => gettext("PPP"), "pppoe" => gettext("PPPoE"), "pptp" => gettext("PPTP"), "l2tp" => gettext("L2TP")); |