mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 10:50:23 +01:00
Ensure IP addresses w/o MAC addresses are also shown and that already added clients are hidden.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -216,7 +216,7 @@ if ($_POST['action'] == 'get_groups') {
|
||||
// Loop over results
|
||||
$ips = array();
|
||||
while ($res = $query->fetchArray(SQLITE3_ASSOC)) {
|
||||
$ips[$res['hwaddr']] = $res['name'] !== null ? $res['name'] : '';
|
||||
$ips[strtoupper($res['hwaddr'])] = $res['name'] !== null ? $res['name'] : '';
|
||||
}
|
||||
$FTLdb->close();
|
||||
|
||||
@@ -227,8 +227,11 @@ if ($_POST['action'] == 'get_groups') {
|
||||
|
||||
// Loop over results, remove already configured clients
|
||||
while (($res = $query->fetchArray(SQLITE3_ASSOC)) !== false) {
|
||||
if (isset($ips[$res['hwaddr']])) {
|
||||
unset($ips[$res['hwaddr']]);
|
||||
if (isset($ips[$res['ip']])) {
|
||||
unset($ips[$res['ip']]);
|
||||
}
|
||||
if (isset($ips["IP-".$res['ip']])) {
|
||||
unset($ips["IP-".$res['ip']]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user