diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-09-16 23:04:38 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-09-16 23:04:38 +0300 |
commit | 52544fdacd0d7dc24424c2aacaebe1c5df5577d8 (patch) | |
tree | 0d2a9e039164a7161ac7e2e20e9d480179008f77 /localwebsite/handlers | |
parent | 79c59138977ec4abd804e52217a4f6e5d307c65f (diff) | |
parent | f228efad1e7c0b5080d1fa4cdaff2ae46b4276e7 (diff) |
Merge branch 'master' of ch1p.io:homekit
Diffstat (limited to 'localwebsite/handlers')
-rw-r--r-- | localwebsite/handlers/ModemHandler.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/localwebsite/handlers/ModemHandler.php b/localwebsite/handlers/ModemHandler.php index aca69a3..b54b82c 100644 --- a/localwebsite/handlers/ModemHandler.php +++ b/localwebsite/handlers/ModemHandler.php @@ -146,7 +146,12 @@ class ModemHandler extends RequestHandler } public function GET_routing_dhcp_page() { + $overrides = config::get('dhcp_hostname_overrides'); $leases = MyOpenWrtUtils::getDHCPLeases(); + foreach ($leases as &$lease) { + if ($lease['hostname'] == '?' && array_key_exists($lease['mac'], $overrides)) + $lease['hostname'] = $overrides[$lease['mac']]; + } $this->tpl->set([ 'leases' => $leases ]); |