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:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user