mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-11-10 03:30:08 +01: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:
1 parent
28c0efe755
commit
1025d99601
1 file changed
+2
-2
@@ -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