$date_point = new DateAndTime(); // Represents current date. TODO: verify this is needed, as this is server time, not browser today.
// TODO: refactoring ongoing down from here. Make code nicer, etc.
- $weekStartDay = $user->week_start;
+ $weekStartDay = $user->getWeekStart();
$this->startDate = new DateAndTime();
$this->startDate->setFormat($date_point->getFormat());
$this->mMonthNames = $i18n->monthNames;
$this->mWeekDayShortNames = $i18n->weekdayShortNames;
- $this->weekStartDay = $user->week_start;
+ $this->weekStartDay = $user->getWeekStart();
}
function setStyle($style) { $this->style = $style; }
$this->lCalendarButtons['close'] = $i18n->get('button.close');
$this->mDateFormat = $user->getDateFormat();
- $this->mWeekStartDay = $user->week_start;
+ $this->mWeekStartDay = $user->getWeekStart();
}
// set current value taken from session or database
return ($this->behalfGroup ? $this->behalfGroup->time_format : $this->time_format);
}
+ // getWeekStart returns week start day for active group.
+ function getWeekStart() {
+ return ($this->behalfGroup ? $this->behalfGroup->week_start : $this->week_start);
+ }
+
// getTrackingMode returns tracking mode for active group.
function getTrackingMode() {
return ($this->behalfGroup ? $this->behalfGroup->tracking_mode : $this->tracking_mode);
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.19.4.4994 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.19.4.4995 | Copyright © <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>
$_SESSION['date'] = $cl_date;
// Determine selected week start and end dates.
-$weekStartDay = $user->week_start;
+$weekStartDay = $user->getWeekStart();
$t_arr = localtime($selected_date->getTimestamp());
$t_arr[5] = $t_arr[5] + 1900;
if ($t_arr[6] < $weekStartDay)