From 0bd866162cda1e8e5f9617e1d23322163f3a66e6 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 11 Apr 2018 00:31:37 +0000 Subject: [PATCH] Cleanup. Removed unused function. --- WEB-INF/lib/ttTeamHelper.class.php | 42 ------------------------------ WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 1 insertion(+), 43 deletions(-) diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 359f6b97..53474490 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -691,48 +691,6 @@ class ttTeamHelper { return false; } - // The markDeleted function marks the group and everything in it as deleted. - static function markDeleted($group_id) { - - // Iterate through group users and mark them as deleted. - $users = ttTeamHelper::getAllUsers($group_id); - foreach ($users as $one_user) { - if (!ttUserHelper::markDeleted($one_user['id'])) return false; - } - - // Mark tasks deleted. - if (!ttTeamHelper::markTasksDeleted($group_id)) return false; - - $mdb2 = getConnection(); - - // Mark roles deleted. - $sql = "update tt_roles set status = NULL where group_id = $group_id"; - $affected = $mdb2->exec($sql); - if (is_a($affected, 'PEAR_Error')) return false; - - // Mark projects deleted. - $sql = "update tt_projects set status = NULL where group_id = $group_id"; - $affected = $mdb2->exec($sql); - if (is_a($affected, 'PEAR_Error')) return false; - - // Mark clients deleted. - $sql = "update tt_clients set status = NULL where group_id = $group_id"; - $affected = $mdb2->exec($sql); - if (is_a($affected, 'PEAR_Error')) return false; - - // Mark custom fields deleted. - $sql = "update tt_custom_fields set status = NULL where group_id = $group_id"; - $affected = $mdb2->exec($sql); - if (is_a($affected, 'PEAR_Error')) return false; - - // Mark group deleted. - $sql = "update tt_groups set status = NULL where id = $group_id"; - $affected = $mdb2->exec($sql); - if (is_a($affected, 'PEAR_Error')) return false; - - return true; - } - // The insert function creates a new group. static function insert($fields) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d1c48e47..3136c712 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.87.4246 | Copyright © Anuko | +  Anuko Time Tracker 1.17.87.4247 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} -- 2.20.1