Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
6870e1fa
Commit
6870e1fa
authored
Apr 20, 2016
by
David Monllaó
Browse files
Merge branch 'MDL-53757_master' of
git://github.com/markn86/moodle
parents
eb91deaa
7bdc3ba6
Changes
1
Hide whitespace changes
Inline
Side-by-side
calendar/view.php
View file @
6870e1fa
...
...
@@ -53,25 +53,26 @@ $time = optional_param('time', 0, PARAM_INT);
$url
=
new
moodle_url
(
'/calendar/view.php'
);
if
(
$courseid
!=
SITEID
)
{
$url
->
param
(
'course'
,
$courseid
);
}
if
(
$view
!==
'upcoming'
)
{
$url
->
param
(
'view'
,
$view
);
}
// If a day, month and year were passed then convert it to a timestamp. If these were passed
// then we can assume the day, month and year are passed as Gregorian, as no where in core
// should we be passing these values rather than the time. This is done for BC.
if
(
!
empty
(
$day
)
&&
!
empty
(
$mon
)
&&
!
empty
(
$year
))
{
if
(
checkdate
(
$mon
,
$day
,
$year
))
{
$time
=
make_timestamp
(
$year
,
$mon
,
$day
);
}
else
{
$time
=
usergetmidnight
(
time
());
}
}
else
if
(
empty
(
$time
))
{
$time
=
usergetmidnight
(
time
());
}
if
(
empty
(
$time
))
{
$time
=
time
();
}
if
(
$courseid
!=
SITEID
)
{
$url
->
param
(
'course'
,
$courseid
);
}
if
(
$view
!==
'upcoming'
)
{
$time
=
usergetmidnight
(
$time
);
$url
->
param
(
'view'
,
$view
);
}
$url
->
param
(
'time'
,
$time
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment