diff --git a/onyx/include/common/Team.class.php b/onyx/include/common/Team.class.php index 0e3c9ffe..18e615c6 100644 --- a/onyx/include/common/Team.class.php +++ b/onyx/include/common/Team.class.php @@ -89,6 +89,19 @@ class Team return ($aff == 1); } + // TODO: Drop members ? + function drop() + { + $db = new BDD(); + if (!empty($this->id)) + $db->query("DELETE FROM teams WHERE id = ".intval($this->id)); + $aff = $db->affected(); + if ($aff == 1) + $this->id = 0; + $db->deconnexion(); + return $aff; + } + function get_id() { return $this->id; }