From: Nik Okuntseff Date: Tue, 4 Dec 2018 13:41:13 +0000 (+0000) Subject: Improved project delete by also deleting client binds. X-Git-Tag: timetracker_1.19-1~487 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=cb86dc570b33c9ed1199a5b9c473c0cdbbed32a3;p=timetracker.git Improved project delete by also deleting client binds. --- 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; }