= e($module['title']) ?>
= e($module['description'] ?? '') ?>
all(); $error = null; $notice = null; $GLOBALS['layout_header_base_title'] = 'Modulverwaltung'; $GLOBALS['layout_header_title'] = 'Modulverwaltung'; $GLOBALS['layout_header_context'] = 'Aktive Module'; $GLOBALS['layout_header_text'] = ''; $GLOBALS['layout_header_actions'] = []; $knownAuthUsers = modules()->knownAuthUsers(); $authUserLabels = []; foreach ($knownAuthUsers as $knownAuthUser) { if (!is_array($knownAuthUser)) { continue; } $label = trim((string) ($knownAuthUser['name'] ?? '')); if ($label === '') { $label = trim((string) ($knownAuthUser['username'] ?? '')); } if ($label === '') { $label = trim((string) ($knownAuthUser['email'] ?? '')); } foreach (['sub', 'username', 'email'] as $key) { $value = trim((string) ($knownAuthUser[$key] ?? '')); if ($value !== '' && $label !== '') { $authUserLabels[$value] = $label; } } } if ($_SERVER['REQUEST_METHOD'] === 'POST') { require_admin(); $name = (string)($_POST['module'] ?? ''); $action = (string)($_POST['action'] ?? ''); if ($name !== '' && ($action === 'enable' || $action === 'disable')) { $enabled = $action === 'enable'; modules()->setEnabled($name, $enabled); $notice = $enabled ? 'Modul aktiviert.' : 'Modul deaktiviert.'; $modules = modules()->all(); } elseif ($name !== '' && $action === 'migrate') { $applied = modules()->applyPendingMigrations($name); $notice = count($applied) . ' Migration(en) angewendet.'; $modules = modules()->all(); } else { $error = 'Ungültige Aktion.'; } } ?>
= e($module['description'] ?? '') ?>