mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-07 12:52:54 -05:00
Added DeviceSearchBarServerAndClientName option, #3260
This commit is contained in:
@@ -5577,10 +5577,14 @@
|
||||
try {
|
||||
var rs = x.split(/\s+/).join('|'), rx = new RegExp(rs); // In some cases (like +), this can throw an exception.
|
||||
for (var d in nodes) {
|
||||
if (showRealNames) {
|
||||
if (nodes[d].rnamel != null && rx.test(nodes[d].rnamel.toLowerCase())) { r.push(d); }
|
||||
if (features2 & 0x00008000) { // Both server and client names must match
|
||||
if (rx.test(nodes[d].name.toLowerCase()) || ((nodes[d].rnamel != null) && rx.test(nodes[d].rnamel.toLowerCase()))) { r.push(d); }
|
||||
} else {
|
||||
if (rx.test(nodes[d].name.toLowerCase())) { r.push(d); }
|
||||
if (showRealNames) {
|
||||
if (nodes[d].rnamel != null && rx.test(nodes[d].rnamel.toLowerCase())) { r.push(d); }
|
||||
} else {
|
||||
if (rx.test(nodes[d].name.toLowerCase())) { r.push(d); }
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (ex) { for (var d in nodes) { r.push(d); } }
|
||||
|
||||
Reference in New Issue
Block a user