mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-25 19:37:26 +02:00
Améliorations du code
This commit is contained in:
@ -13,8 +13,8 @@ $id = htmlspecialchars($_GET["file_id"]);
|
||||
$type = DocumentType::SOLUTION;
|
||||
$file = Solution::fromId($id);
|
||||
if ($file === null) {
|
||||
$type = DocumentType::SYNTHESE;
|
||||
$file = Synthese::fromId($id);
|
||||
$type = DocumentType::SYNTHESIS;
|
||||
$file = Synthesis::fromId($id);
|
||||
|
||||
if ($file === null) {
|
||||
$file = Document::fromId($id);
|
||||
@ -37,7 +37,7 @@ if ($file !== null) {
|
||||
if (($_SESSION["role"] == Role::PARTICIPANT || $_SESSION["role"] == Role::ENCADRANT) && (!isset($_SESSION["team"]) || $_SESSION["team"]->getId() != $team->getId()))
|
||||
require_once "server_files/403.php";
|
||||
}
|
||||
else if ($type == DocumentType::SYNTHESE) {
|
||||
else if ($type == DocumentType::SYNTHESIS) {
|
||||
$dest = $file->getDest();
|
||||
$name = "Note de synthèse $trigram pour " . ($dest == DestType::OPPOSANT ? "l'opposant" : "le rapporteur") . ".pdf";
|
||||
|
||||
|
Reference in New Issue
Block a user