A bit more refactoring.
authorNik Okuntseff <support@anuko.com>
Fri, 30 Nov 2018 13:32:31 +0000 (13:32 +0000)
committerNik Okuntseff <support@anuko.com>
Fri, 30 Nov 2018 13:32:31 +0000 (13:32 +0000)
WEB-INF/lib/ttFavReportHelper.class.php
WEB-INF/lib/ttInvoiceHelper.class.php
WEB-INF/templates/footer.tpl

index f1943f7..36600e2 100644 (file)
@@ -107,13 +107,8 @@ class ttFavReportHelper {
     if (is_a($affected, 'PEAR_Error'))
       return false;
 
-    $sql = "select last_insert_id() as last_id";
-    $res = $mdb2->query($sql);
-    if (is_a($res, 'PEAR_Error'))
-      return false;
-
-    $val = $res->fetchRow();
-    return $val['last_id'];
+    $last_id = $mdb2->lastInsertID('tt_fav_reports', 'id');
+    return $last_id;
   }
 
   // updateReport - updates report options in the database.
index 3d67f6a..41dace0 100644 (file)
@@ -56,12 +56,7 @@ class ttInvoiceHelper {
 
     if (is_a($affected, 'PEAR_Error')) return false;
 
-    $last_id = 0;
-    $sql = "select last_insert_id() as last_insert_id";
-    $res = $mdb2->query($sql);
-    $val = $res->fetchRow();
-    $last_id = $val['last_insert_id'];
-
+    $last_id = $mdb2->lastInsertID('tt_invoices', 'id');
     return $last_id;
   }
 
index 501ebf7..c161580 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.28.4544 | 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.28.4545 | 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>