mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-08-10 07:11:18 +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();
|
$db = Database::getInstance();
|
||||||
// Only published theses are visible via public recap (no slug-auth here).
|
// Share-link theses may be unpublished; use getThesis() without published filter.
|
||||||
$thesis = $db->getThesisById($thesisId);
|
$thesis = $db->getThesis($thesisId);
|
||||||
if (!$thesis) {
|
if (!$thesis) {
|
||||||
http_response_code(404);
|
http_response_code(404);
|
||||||
die('TFE introuvable.');
|
die('TFE introuvable.');
|
||||||
|
|||||||
Reference in New Issue
Block a user