]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/ttTeamHelper.class.php
Fixed cleanup code to include tt_roles table.
[timetracker.git] / WEB-INF / lib / ttTeamHelper.class.php
index aebf52a9d660e2302ce8627c3d5f5d9db537bb89..e88492e511e4092537eda692fad419a2e0e93a2a 100644 (file)
@@ -885,6 +885,11 @@ class ttTeamHelper {
     // Delete custom fields.
     if (!ttTeamHelper::deleteCustomFields($team_id)) return false;
 
+    // Delete roles.
+    $sql = "delete from tt_roles where team_id = $team_id";
+    $affected = $mdb2->exec($sql);
+    if (is_a($affected, 'PEAR_Error')) return false;
+
     // Delete team.
     $sql = "delete from tt_teams where id = $team_id";
     $affected = $mdb2->exec($sql);