Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
calendar-3330521
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
calendar-3330521
Commits
0cb71e22
Commit
0cb71e22
authored
16 years ago
by
Karen Stevenson
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.txt
+1
-0
1 addition, 0 deletions
CHANGELOG.txt
calendar.inc
+7
-6
7 additions, 6 deletions
calendar.inc
with
8 additions
and
6 deletions
CHANGELOG.txt
+
1
−
0
View file @
0cb71e22
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
calendar.inc
+
7
−
6
View file @
0cb71e22
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment