mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
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.
This commit is contained in:
parent
99a8036453
commit
f0eef2ef62
@ -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'])) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user