From cb86dc570b33c9ed1199a5b9c473c0cdbbed32a3 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 4 Dec 2018 13:41:13 +0000 Subject: [PATCH] Improved project delete by also deleting client binds. --- WEB-INF/lib/ttProjectHelper.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/WEB-INF/lib/ttProjectHelper.class.php b/WEB-INF/lib/ttProjectHelper.class.php index 98d928f9..b5fb74dc 100644 --- a/WEB-INF/lib/ttProjectHelper.class.php +++ b/WEB-INF/lib/ttProjectHelper.class.php @@ -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; } -- 2.20.1