module change

This commit is contained in:
2026-03-04 23:42:00 +01:00
parent 32d4082bf8
commit 7d73c570c9
4 changed files with 99 additions and 19 deletions

View File

@@ -8,15 +8,11 @@ $pdo = modules()->modulePdo('kea', $fallback);
$hosts = [];
$error = null;
if ($pdo) {
try {
$repo = new KeaHostRepository($pdo);
$hosts = $repo->findAll(50);
} catch (\Exception $e) {
$error = "Datenbankfehler: " . $e->getMessage();
}
} else {
$error = "Modul nicht konfiguriert. Bitte Setup ausführen.";
try {
$repo = new KeaHostRepository($pdo);
$hosts = $repo->findAll(50);
} catch (\Exception $e) {
$error = "Datenbankfehler: " . $e->getMessage();
}
module_tpl('kea', 'dashboard', compact('hosts', 'error'));