mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
- toast-fragment.php: 204 early-exit now also checks flash['warning']; previously the warning was consumed by consumeFlash() then silently dropped - partage/index.php: store warning as plain text; htmlspecialchars() applied once at render time — previously htmlspecialchars() was called inside the stored string then again at output, producing ' entities etc. - partage/index.php: flash-warning div gets id + tabindex=-1; inline JS scrolls it into view and focuses it on DOMContentLoaded - admin/footer.php: htmx:afterSettle listener focuses .toast--warning after HTMX injects the toast fragment into #toast-region
1.6 KiB
1.6 KiB
XAMXAM TODO
Duplicate TFE submission prevention (fixes)
DuplicateThesisException— typed exception carrying existing thesis metadataDatabase::findDuplicateThesis()— year + author + normalised-title matching (exact, prefix, Levenshtein ≤10%)ThesisCreateController::submit()— calls duplicate check before any DB write, throwsDuplicateThesisExceptionAppLogger::logDuplicate()— dedicated log action (status: duplicate) for audit trailApp::flash/consumeFlash— extended to supportwarningtype alongsideerror/successadmin/actions/formulaire.php— catchesDuplicateThesisExceptionseparately; logs it; flashes HTML warning with link to existing thesis; repopulates formpartage/index.php— same catch block; plain-text warning (no admin link) surfaced on the student form viaflash-warningbanner; form repopulatedtoast.php— renderstoast--warningblockadmin.css—.toast--warningstyle + link colourform.css—.flash-warningstyle (partage form)
Duplicate warning display fixes
toast-fragment.php— 204 guard now also checkswarning; warning was silently discarded beforepartage/index.php— warning stored as plain text (no pre-escaping);htmlspecialchars()applied once at render; was double-encoded beforepartage/index.php—flash-warningdiv getsid+tabindex=-1; inline JS scrolls and focuses it on loadadmin/footer.php—htmx:afterSettlelistener focuses.toast--warningafter HTMX injects the toast fragment