Release 1.0 notes + fixes: remove kc_phasen query, init $debug_output; add CHANGELOG and link from README

This commit is contained in:
ProgrammGamer
2026-02-01 19:26:18 +01:00
parent 7184d64116
commit a3c08127f8
4 changed files with 25 additions and 10 deletions

16
CHANGELOG.md Normal file
View File

@@ -0,0 +1,16 @@
# Changelog
All notable changes to this project are documented in this file.
## [1.0] - 2026-02-01
### Added
- Initial release of the KonfiCastle Workshop-Wahlen plugin (Admin backend, participant frontend, assignment logic, CSV export, teamer password management).
- Shortcodes: `[konficastle_workshopwahl wahl=ID]`, `[konficastle_workshop_ergebnis wahl=ID]`.
### Fixed
- Removed query against non-existent table `kc_phasen`; phases are derived from `kc_wahlen.anzahl_einheiten`. See [includes/admin-workshops.php](includes/admin-workshops.php).
- Initialized `$debug_output` to prevent PHP warning in frontend. See [includes/frontend-form.php](includes/frontend-form.php).
### Notes
- Database tables use WordPress prefix via `$wpdb->prefix`.
- Force assignments have priority over automatic allocation.

View File

@@ -48,3 +48,7 @@ Dieses WordPress-Plugin ermöglicht die Verwaltung und Durchführung von Worksho
Für Detailfragen zu Datenbankstruktur, Shortcodes oder Zuteilungslogik siehe die jeweiligen Dateien im `includes/`-Verzeichnis.
## Release Notes
Siehe die ausführlichen Hinweise zur Version 1.0 in [RELEASE_NOTES.md](RELEASE_NOTES.md).

View File

@@ -10,8 +10,9 @@ function kc_workshops_page() {
// Liste aller Wahlen für Auswahl
$wahlen_liste = $wpdb->get_results("SELECT * FROM {$prefix}kc_wahlen ORDER BY id DESC");
// Liste aller Phasen für Auswahl
$phasen_liste = $wpdb->get_results("SELECT * FROM {$prefix}kc_phasen ORDER BY nummer");
// Phasen werden pro Wahl über die Spalte `anzahl_einheiten` in `kc_wahlen` bestimmt.
// Eine separate Tabelle `kc_phasen` wird nicht benötigt.
$phasen_liste = [];
// Workshop löschen
if (isset($_GET['delete_workshop'])) {

View File

@@ -5,14 +5,8 @@ add_shortcode('konficastle_workshopwahl', function($atts) {
global $wpdb;
// KRITISCHER TEST: Ausgabe ganz am Anfang
//$debug_output = '<div style="background:yellow;padding:20px;margin:20px 0;border:3px solid red;">';
//$debug_output .= '<h3>DEBUG INFO</h3>';
//$debug_output .= 'Shortcode läuft!<br>';
//$debug_output .= 'REQUEST_METHOD: ' . ($_SERVER['REQUEST_METHOD'] ?? 'NICHT GESETZT') . '<br>';
//$debug_output .= 'POST vorhanden: ' . (empty($_POST) ? 'NEIN' : 'JA') . '<br>';
//$debug_output .= 'POST Inhalt: <pre>' . print_r($_POST, true) . '</pre>';
//$debug_output .= '</div>';
// Optionales Debug-Ausgabe-Fragment (standardmäßig leer, um Warnungen zu vermeiden)
$debug_output = '';
$wahl = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->prefix}kc_wahlen WHERE id=%d", $wahl_id));
if(!$wahl || !$wahl->freigegeben) {