mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-06-25 09:40:29 +02:00
Une équipe ne peut pas recevoir de vidéos d'une autre équipe non participante
This commit is contained in:
@ -70,10 +70,10 @@ class Team
|
||||
return $team;
|
||||
}
|
||||
|
||||
public static function getAllTeams($problem)
|
||||
public static function getAllTeams($problem, $only_validated = false)
|
||||
{
|
||||
global $DB, $YEAR;
|
||||
$req = $DB->prepare("SELECT * FROM `teams` WHERE " . ($problem < 0 ? "" : "`problem` = ? AND ") . "`year` = $YEAR;");
|
||||
$req = $DB->prepare("SELECT * FROM `teams` WHERE " . ($problem < 0 ? "" : "`problem` = ? AND ") . ($only_validated ? "`validation_status` = 'VALIDATED' AND " : "") . "`year` = $YEAR;");
|
||||
$req->execute([htmlspecialchars($problem)]);
|
||||
|
||||
$teams = [];
|
||||
|
Reference in New Issue
Block a user