summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2014-12-04 16:16:05 +0545
committerRenato Botelho <garga@FreeBSD.org>2014-12-04 08:40:06 -0200
commitb8959f3c85aa59d7916efca3235798a232c45de2 (patch)
tree5174c4a9b7a0a9d4128faa66d3fc6d794944d0d5
parent01b8dbb099a1accf050b090fa6f58faf9df785fb (diff)
downloadpfsense-b8959f3c85aa59d7916efca3235798a232c45de2.zip
pfsense-b8959f3c85aa59d7916efca3235798a232c45de2.tar.gz
Provide friendly descr in error message in Interfaces Assign
I was doing drastic things testing some stuff, swapping WAN and OPT1 interfaces in Interfaces->Assign. I accidentally pressed Save when I had the same real device selected for both. Thankfully there was input validation! But I noticed that the error message reported just the names WAN and OPT1, but actual I had them named as different things. So the names in the error message did not match the names (friendly descriptions) in the table of interfaces. This change makes it display both like FRIENDLY_DESC (FRIENDLY_NAME) so there is less room for confusion.
-rw-r--r--usr/local/www/interfaces_assign.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php
index f971874..a2ab3a6 100644
--- a/usr/local/www/interfaces_assign.php
+++ b/usr/local/www/interfaces_assign.php
@@ -276,7 +276,7 @@ if (isset($_POST['add_x']) && isset($_POST['if_add'])) {
' interfaces:'), $portname, count($ifnames));
foreach ($portifmap[$portname] as $ifn)
- $errstr .= " " . $ifn;
+ $errstr .= " " . convert_friendly_interface_to_friendly_descr(strtolower($ifn)) . " (" . $ifn . ")";
$input_errors[] = $errstr;
} else if (count($ifnames) == 1 && preg_match('/^bridge[0-9]/', $portname) && is_array($config['bridges']['bridged']) && count($config['bridges']['bridged'])) {
OpenPOWER on IntegriCloud