fix: escape apostrophe in FORM_HELP_LABELS string (Database.php:2005)

This commit is contained in:
Pontoporeia
2026-04-29 21:05:53 +02:00
parent d665cb502d
commit 0437ec8d15
8 changed files with 225 additions and 5 deletions

View File

@@ -0,0 +1,26 @@
-- Form help blocks: stores per-fieldset student-facing explanatory text
-- displayed in the /partage share-link submission form.
-- Each row is keyed by a stable slug matching TODO locations in partage/index.php.
CREATE TABLE IF NOT EXISTS form_help_blocks (
key TEXT PRIMARY KEY,
content TEXT NOT NULL DEFAULT '',
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
CREATE TRIGGER IF NOT EXISTS update_form_help_blocks_timestamp
AFTER UPDATE ON form_help_blocks
BEGIN
UPDATE form_help_blocks SET updated_at = CURRENT_TIMESTAMP WHERE key = NEW.key;
END;
-- Seed the eight block slots referenced in partage/index.php.
INSERT OR IGNORE INTO form_help_blocks (key, content) VALUES
('partage_intro', ''),
('fieldset_tfe_info', ''),
('fieldset_synopsis', ''),
('fieldset_jury', ''),
('fieldset_academic', ''),
('fieldset_files', ''),
('fieldset_access', ''),
('fieldset_email', '');