mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-08-10 15:21:22 +02:00
fix: use getThesis() instead of getThesisById() in share recap page
getThesisById() filters by is_published=1, but theses submitted via share links are unpublished. The recap page after submission was showing 'TFE introuvable' because it couldn't find the just-created unpublished thesis.
This commit is contained in:
@@ -18,8 +18,8 @@ if ($thesisId <= 0) {
|
||||
}
|
||||
|
||||
$db = Database::getInstance();
|
||||
// Only published theses are visible via public recap (no slug-auth here).
|
||||
$thesis = $db->getThesisById($thesisId);
|
||||
// Share-link theses may be unpublished; use getThesis() without published filter.
|
||||
$thesis = $db->getThesis($thesisId);
|
||||
if (!$thesis) {
|
||||
http_response_code(404);
|
||||
die('TFE introuvable.');
|
||||
|
||||
Reference in New Issue
Block a user