From: Nik Okuntseff Date: Sat, 27 Apr 2019 17:02:25 +0000 (+0000) Subject: Added a couple of clarifying comments. X-Git-Tag: timetracker_1.19-1~34 X-Git-Url: http://wagnertech.de/git?p=timetracker.git;a=commitdiff_plain;h=8a671525046655e057a15c6de9507834322b466d Added a couple of clarifying comments. --- diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index bd777ea9..447a45e0 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -126,6 +126,8 @@ class Calendar extends FormElement { $str .= ""; + // 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')) { diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 6fd816e0..57790e22 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -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); } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 44dea7a7..343a4d04 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.19.4.4995 | Copyright © Anuko | +  Anuko Time Tracker 1.19.4.4996 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve}