Improved project delete by also deleting client binds.
authorNik Okuntseff <support@anuko.com>
Tue, 4 Dec 2018 13:41:13 +0000 (13:41 +0000)
committerNik Okuntseff <support@anuko.com>
Tue, 4 Dec 2018 13:41:13 +0000 (13:41 +0000)
WEB-INF/lib/ttProjectHelper.class.php

index 98d928f..b5fb74d 100644 (file)
@@ -183,6 +183,12 @@ class ttProjectHelper {
     if (is_a($affected, 'PEAR_Error'))
       return false;
 
+    // Delete client binds to this project.
+    $sql = "delete from tt_client_project_binds where project_id = $id and group_id = $group_id and org_id = $org_id";
+    $affected = $mdb2->exec($sql);
+    if (is_a($affected, 'PEAR_Error'))
+      return false;
+
     return true;
   }