mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
fix: escape apostrophe in FORM_HELP_LABELS string (Database.php:2005)
This commit is contained in:
26
app/migrations/applied/004_add_form_help_blocks.sql
Normal file
26
app/migrations/applied/004_add_form_help_blocks.sql
Normal 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', '');
|
||||
Reference in New Issue
Block a user