1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-25 18:17:28 +02:00

Ajouts & correction de bugs

This commit is contained in:
Yohann D'ANELLO
2019-12-26 22:30:42 +01:00
parent e9f10ca14f
commit da8efde057
16 changed files with 363 additions and 32 deletions

View File

@ -182,4 +182,20 @@ class Team
{
return $this->year;
}
public static function getAllTeams($only_not_validated = false)
{
global $DB, $YEAR;
$req = $DB->query("SELECT * FROM `teams` WHERE " . ($only_not_validated ? "`validation_status` = 'NOT_READY' AND " : "") . "`year` = $YEAR;");
$teams = [];
while (($data = $req->fetch()) != false) {
$team = new Team();
$team->fill($data);
$teams[] = $team;
}
return $teams;
}
}