]> wagnertech.de Git - timetracker.git/commitdiff
Fixed db cleanup script by including predefined expenses.
authorNik Okuntseff <support@anuko.com>
Sat, 17 Nov 2018 16:52:44 +0000 (16:52 +0000)
committerNik Okuntseff <support@anuko.com>
Sat, 17 Nov 2018 16:52:44 +0000 (16:52 +0000)
WEB-INF/lib/ttOrgHelper.class.php
WEB-INF/lib/ttTeamHelper.class.php
WEB-INF/templates/footer.tpl
dbinstall.php

index 81bfbcf7010416214e960393e0e8c3b0cf9a6e9b..3692123915a1c6f4e4c4843eb52efe6cb5f53768 100644 (file)
@@ -90,6 +90,11 @@ class ttOrgHelper {
     // However, at this time not all tables have org_id.
     // So, we need to add the field as we write code here.
 
     // However, at this time not all tables have org_id.
     // So, we need to add the field as we write code here.
 
+    // Delete predefined expenses.
+    $sql = "delete from tt_predefined_expenses where org_id = $org_id";
+    $affected = $mdb2->exec($sql);
+    if (is_a($affected, 'PEAR_Error')) return false;
+
     // Delete monthly quotas.
     $sql = "delete from tt_monthly_quotas where org_id = $org_id";
     $affected = $mdb2->exec($sql);
     // Delete monthly quotas.
     $sql = "delete from tt_monthly_quotas where org_id = $org_id";
     $affected = $mdb2->exec($sql);
index 2198c0a85badbc4710d9d9603f2df564a745c879..4203fdc61c1ba9495b28d3c7875b0a699b32fedb 100644 (file)
@@ -703,6 +703,11 @@ class ttTeamHelper {
     $affected = $mdb2->exec($sql);
     if (is_a($affected, 'PEAR_Error')) return false;
 
     $affected = $mdb2->exec($sql);
     if (is_a($affected, 'PEAR_Error')) return false;
 
+    // Delete predefined expenses.
+    $sql = "delete from tt_predefined_expenses where group_id = $group_id";
+    $affected = $mdb2->exec($sql);
+    if (is_a($affected, 'PEAR_Error')) return false;
+
     // Delete monthly quotas.
     $sql = "delete from tt_monthly_quotas where group_id = $group_id";
     $affected = $mdb2->exec($sql);
     // Delete monthly quotas.
     $sql = "delete from tt_monthly_quotas where group_id = $group_id";
     $affected = $mdb2->exec($sql);
index f5c8057427509e43a873e47675535455b19de32e..232208f909660c5cdc439021db63ed960c01d8de 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.16.4441 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.16.4442 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index 8b7e8c5e1c6b8389fc939f061ddb088906b36979..069016abe2cf86e7ec77ab1e57b8edc31eff71f8 100644 (file)
@@ -1031,6 +1031,7 @@ if ($_POST) {
     setChange("OPTIMIZE TABLE tt_invoices");
     setChange("OPTIMIZE TABLE tt_log");
     setChange("OPTIMIZE TABLE tt_monthly_quotas");
     setChange("OPTIMIZE TABLE tt_invoices");
     setChange("OPTIMIZE TABLE tt_log");
     setChange("OPTIMIZE TABLE tt_monthly_quotas");
+    setChange("OPTIMIZE TABLE tt_predefined_expenses");
     setChange("OPTIMIZE TABLE tt_project_task_binds");
     setChange("OPTIMIZE TABLE tt_projects");
     setChange("OPTIMIZE TABLE tt_tasks");
     setChange("OPTIMIZE TABLE tt_project_task_binds");
     setChange("OPTIMIZE TABLE tt_projects");
     setChange("OPTIMIZE TABLE tt_tasks");