summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-01-18 16:11:04 -0200
committerRenato Botelho <renato@netgate.com>2016-01-18 16:11:04 -0200
commite656d8a3ad7fab8ccbe1da264f00120a6994c53e (patch)
treef447621e8118f9d0fda2f564527e71ee640e92f8
parentfdc515af3361bd0371f236557fa018b41d61578c (diff)
parent1d44f99f358e8b19972dfbe252233e7b099e94be (diff)
downloadpfsense-e656d8a3ad7fab8ccbe1da264f00120a6994c53e.zip
pfsense-e656d8a3ad7fab8ccbe1da264f00120a6994c53e.tar.gz
Merge pull request #2465 from phil-davis/patch-2
-rw-r--r--usr/local/www/interfaces.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 7184dee..6a140b7 100644
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -504,6 +504,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.");
}
@@ -1493,7 +1503,7 @@ foreach ($mediaopts as $mediaopt){
}
}
-$pgtitle = array(gettext("Interfaces"), $pconfig['descr']);
+$pgtitle = array(gettext("Interfaces"), $wancfg['descr']);
$shortcut_section = "interfaces";
$closehead = false;
OpenPOWER on IntegriCloud