From faa4c237c8a27563c80d409fce8a95a27edfb6b6 Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Mon, 11 May 2026 00:03:17 +0200 Subject: [PATCH] adad --- modules/mining-checker/bootstrap.php | 3 + partials/landingpages/modules/setup.php | 94 ++++++++++++++++++++----- 2 files changed, 79 insertions(+), 18 deletions(-) diff --git a/modules/mining-checker/bootstrap.php b/modules/mining-checker/bootstrap.php index 68599b2..e636ae3 100644 --- a/modules/mining-checker/bootstrap.php +++ b/modules/mining-checker/bootstrap.php @@ -142,16 +142,19 @@ $mm->registerFunction($moduleName, 'setup_actions', static function (): array { [ 'name' => 'initialize_schema', 'label' => 'Tabellen importieren', + 'section' => 'database', 'help' => 'Legt die Mining-Checker Tabellen an, wenn sie noch nicht vorhanden sind.', ], [ 'name' => 'upgrade_schema', 'label' => 'Tabellen updaten', + 'section' => 'database', 'help' => 'Fuehrt fehlende Tabellen- und Spalten-Upgrades fuer den Mining-Checker aus.', ], [ 'name' => 'seed_import', 'label' => 'Seed-Daten importieren', + 'section' => 'database', 'help' => 'Importiert die vordefinierten Startdaten fuer das Standardprojekt.', ], ]; diff --git a/partials/landingpages/modules/setup.php b/partials/landingpages/modules/setup.php index d01e974..56702d8 100644 --- a/partials/landingpages/modules/setup.php +++ b/partials/landingpages/modules/setup.php @@ -75,6 +75,12 @@ $refreshSchedulerState(); $setupActions = modules()->hasFunction($moduleName, 'setup_actions') ? (array) module_fn($moduleName, 'setup_actions') : []; +$databaseSectionActions = array_values(array_filter($setupActions, static function (mixed $action): bool { + return is_array($action) && trim((string) ($action['section'] ?? '')) === 'database'; +})); +$customSectionActions = array_values(array_filter($setupActions, static function (mixed $action): bool { + return !is_array($action) || trim((string) ($action['section'] ?? '')) !== 'database'; +})); $defaults = $module['db_defaults'] ?? []; if (empty($current['db']) && is_array($defaults)) { $current['db'] = $defaults; @@ -137,6 +143,9 @@ foreach ($fields as $field) { $label = (string)($field['label'] ?? $group); $label = trim(preg_replace('/\s+DB\s+Driver$/i', ' DB', $label) ?? $label); + if ($group === 'db') { + $label = 'Custom Datenbank'; + } $label = $label !== '' ? $label : $group; $dbGroups[$group] = $label; } @@ -155,6 +164,7 @@ foreach ($fields as $field) { } $generalSetupFields = []; +$databaseSetupFields = []; $cronSetupFields = []; $customSetupFields = []; foreach ($generalFields as $field) { @@ -163,6 +173,10 @@ foreach ($generalFields as $field) { $generalSetupFields[] = $field; continue; } + if ($fieldName === 'use_separate_db') { + $databaseSetupFields[] = $field; + continue; + } if ($fieldName === 'schedule_timezone') { $cronSetupFields[] = $field; continue; @@ -740,7 +754,7 @@ $manualGroups = array_values(array_filter($allowedGroups, fn (string $value): bo $hasDatabaseSection = array_key_exists('database', $setupSectionConfig) ? !empty($setupSectionConfig['database']) : $dbGroups !== []; -$hasCustomSection = $customSetupFields !== [] || $setupActions !== [] || $isFxRatesSetup; +$hasCustomSection = $customSetupFields !== [] || $customSectionActions !== [] || $isFxRatesSetup; $showCustomDbConfig = !empty($current['use_separate_db']) && !in_array(strtolower(trim((string) ($current['use_separate_db'] ?? ''))), ['0', 'false', 'off', 'standard'], true); $allowedSetupSections = ['general', 'access', 'cron']; if ($hasDatabaseSection) { @@ -1614,7 +1628,42 @@ $GLOBALS['layout_header_context'] = 'Setup / ' . ($sectionTitles[$currentSection - + +
+
+
+ Aktionen +

Datenbankaktionen

+

Tabellenbezogene Wartungsaktionen koennen direkt hier ausgefuehrt werden.

+
+
+
+ + +
+ + + + +
+ +
+
+ +
+
+ + +
>
@@ -1624,7 +1673,7 @@ $GLOBALS['layout_header_context'] = 'Setup / ' . ($sectionTitles[$currentSection
- + -
> +
>
Datenbanken @@ -1683,19 +1732,28 @@ $GLOBALS['layout_header_context'] = 'Setup / ' . ($sectionTitles[$currentSection

Standard nutzt die Nexus-Datenbank. Custom blendet eigene Verbindungsdaten und den DB-Test ein.

-
> - $label): ?> - - -
+ +
+ + + +
+ + 1): ?> +
> + $label): ?> + + +
+
> $label): ?> -
> +
>