Added a couple of clarifying comments.
authorNik Okuntseff <support@anuko.com>
Sat, 27 Apr 2019 17:02:25 +0000 (17:02 +0000)
committerNik Okuntseff <support@anuko.com>
Sat, 27 Apr 2019 17:02:25 +0000 (17:02 +0000)
WEB-INF/lib/form/Calendar.class.php
WEB-INF/lib/ttTimeHelper.class.php
WEB-INF/templates/footer.tpl

index bd777ea..447a45e 100644 (file)
@@ -126,6 +126,8 @@ class Calendar extends FormElement {
 
       $str .= "<tr>";
 
+      // TODO: refactor this entire class, as $weekend_start and $weekend_end
+      // are not what their names suggest (debug with non zero week start to see it).
       $weekend_start = 6 - $this->weekStartDay;      // Saturday by default.
       $weekend_end = (7 - $this->weekStartDay) % 7;  // Sunday by default.
       if (defined('WEEKEND_START_DAY')) {
index 6fd816e..57790e2 100644 (file)
@@ -33,6 +33,11 @@ class ttTimeHelper {
 
   // isWeekend determines if $date falls on weekend.
   static function isWeekend($date) {
+    // NOTE: this does not work for subgroups with different WEEKEND_START_DAY
+    // as the setting is per server. Example: a parent group in USA, with a subgroup
+    // in Saudi Arabia. Their weekends are the same.
+    // Decided NOT to introduce a configurable WEEKEND_START_DAY for groups in UI
+    // to keep UI simple, for now. See also Calendar class with the same issue.
     $weekDay = date('w', strtotime($date));
     return ($weekDay == WEEKEND_START_DAY || $weekDay == (WEEKEND_START_DAY + 1) % 7);
   }
index 44dea7a..343a4d0 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.19.4.4995 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.19.4.4996 | 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>