1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-25 07:40:32 +02:00

Correction de problèmes vis-à-vis de l'envoi et le téléchargement de fichiers

This commit is contained in:
galaxyoyo
2019-09-07 19:01:23 +02:00
parent 44e91a1f8b
commit 5a93a0a754
6 changed files with 37 additions and 34 deletions

View File

@ -80,7 +80,7 @@ class Solution
public static function fromId($id)
{
global $DB;
$req = $DB->prepare("SELECT * FROM `documents` WHERE `file_id` = ?;");
$req = $DB->prepare("SELECT * FROM `solutions` WHERE `file_id` = ?;");
$req->execute([htmlspecialchars($id)]);
$data = $req->fetch();
@ -95,8 +95,8 @@ class Solution
private function fill($data)
{
$this->file_id = $data["file_id"];
$this->team_id = $data["team_id"];
$this->tournament_id = $data["tournament_id"];
$this->team_id = $data["team"];
$this->tournament_id = $data["tournament"];
$this->problem = $data["problem"];
$this->uploaded_at = $data["uploaded_at"];
}
@ -140,7 +140,7 @@ class Synthese
public static function fromId($id)
{
global $DB;
$req = $DB->prepare("SELECT * FROM `documents` WHERE `file_id` = ?;");
$req = $DB->prepare("SELECT * FROM `syntheses` WHERE `file_id` = ?;");
$req->execute([htmlspecialchars($id)]);
$data = $req->fetch();