Skip to content
Snippets Groups Projects
Commit 0cb71e22 authored by Karen Stevenson's avatar Karen Stevenson
Browse files

Set day-splitting timezone to be sure it will split days using the time displayed in the calendar.

parent b6525fe0
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ Views Calendar 5.x
Version 5.2 dev
===============
- Set day-splitting timezone to be sure it will split days using the time displayed in the calendar.
- Adapt processing to make sure only selected dates display in nodes, views, and calendars.
- Add option to maximum items per day to either show maximum plus 'more' link or hide all and link to day.
- #324061, #324701 Revert the calendar_colorpicker.js back to the D5 version, it got switched to the D6 version accidentally.
......
......@@ -410,12 +410,12 @@ function calendar_untranslated_days() {
*/
function calendar_build_filter(&$query, &$view) {
$now = date_now();
if ($query->calendar_type == 'week' && calendar_part_is_valid($query->week, 'week')) {
$range = date_week_range($query->week, $query->year);
$date = $range[0];
$max_date = $range[1];
} else {
}
else {
$month = calendar_part_is_valid($query->month, 'month') ? $query->month : 1;
$day = calendar_part_is_valid($query->day, 'day') ? $query->day : 1;
$year = calendar_part_is_valid($query->year, 'year') ? $query->year : date_format($now, 'Y');
......@@ -434,6 +434,7 @@ function calendar_build_filter(&$query, &$view) {
if (!empty($query_strings)) $queries = array_merge($queries, $query_strings);
$view->date_fields[] = $field;
}
// bring the node type into the query so we can use it in the theme
$query->add_field('type', 'node');
if ($queries) $query->add_where(implode(" OR ", $queries));
......@@ -614,10 +615,10 @@ function calendar_build_nodes(&$view, &$items, $display_type) {
$db_tz = date_get_timezone_db($tz_handling, isset($item->$tz_alias) ? $item->$tz_alias : $display_timezone_name);
$to_zone = date_get_timezone($tz_handling, isset($item->$tz_alias) ? $item->$tz_alias : $display_timezone_name);
// NOTE: Now $display_timezone determines how $item is split
// into one entry per day, while $to_zone determines how date is displayed.
// Maybe someone wants to the date fields's timezone for the day splitting,
// then use: $display_timezone_name = $to_zone;
// Now $display_timezone determines how $item is split into
// one entry per day, while $to_zone determines how date is displayed.
// For now, use the date fields's timezone for the day splitting.
$display_timezone_name = $to_zone;
$values_display = array();
// Start date
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment