fix incorrect display on calendar week view for events on sundays or if first day of week is not sunday
This commit is contained in:
parent
dcf64ed83b
commit
531a53f4dc
2 changed files with 5 additions and 3 deletions
|
|
@ -14,6 +14,8 @@
|
||||||
they are large enough when generating thumbnails in Storage/Image.pm
|
they are large enough when generating thumbnails in Storage/Image.pm
|
||||||
- fix: WebGUI::Image->new doesn't obey width and height settings (Martin Kamerbeek /Oqapi)
|
- fix: WebGUI::Image->new doesn't obey width and height settings (Martin Kamerbeek /Oqapi)
|
||||||
http://www.plainblack.com/bugs/tracker/webguiimage-new-doesnt-obey-width-and-height-settings
|
http://www.plainblack.com/bugs/tracker/webguiimage-new-doesnt-obey-width-and-height-settings
|
||||||
|
- fix: Calendar week view didn't display events correctly if they happened on
|
||||||
|
Sunday or if first day of week was set to Monday.
|
||||||
|
|
||||||
7.3.14
|
7.3.14
|
||||||
- fix: a typo in DatabaseLink.pm
|
- fix: a typo in DatabaseLink.pm
|
||||||
|
|
|
||||||
|
|
@ -1321,12 +1321,12 @@ sub viewWeek {
|
||||||
$dt_event_end = $dtEnd;
|
$dt_event_end = $dtEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
$dt_event_start->set_locale($i18n->get("locale"));
|
my $start_dow = ($dt_event_start->day_of_week - $first_dow) % 7;
|
||||||
$dt_event_end->set_locale($i18n->get("locale"));
|
my $end_dow = ($dt_event_end->day_of_week - $first_dow) % 7;
|
||||||
|
|
||||||
my %eventTemplateVariables = $self->getEventVars($event);
|
my %eventTemplateVariables = $self->getEventVars($event);
|
||||||
|
|
||||||
foreach my $weekDay ($dt_event_start->day_of_week..$dt_event_end->day_of_week) {
|
foreach my $weekDay ($start_dow .. $end_dow) {
|
||||||
push @{$var->{days}->[$weekDay]->{events}}, \%eventTemplateVariables;
|
push @{$var->{days}->[$weekDay]->{events}}, \%eventTemplateVariables;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue