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
mahara
mahara
Commits
7986d8da
Commit
7986d8da
authored
Aug 24, 2009
by
Richard Mansfield
Browse files
Parse dates using the correct format from the language pack on view access page
parent
3d2946e3
Changes
1
Show whitespace changes
Inline
Side-by-side
htdocs/view/access.php
View file @
7986d8da
...
...
@@ -244,17 +244,17 @@ function editaccess_validate(Pieform $form, $values) {
$loggedinaccess
=
false
;
if
(
$values
[
'accesslist'
])
{
foreach
(
$values
[
'accesslist'
]
as
&
$item
)
{
if
(
!
isset
(
$item
[
'startdate'
]))
{
if
(
empty
(
$item
[
'startdate'
]))
{
$item
[
'startdate'
]
=
null
;
}
else
if
(
!
$item
[
'startdate'
]
=
str
to
time
(
$item
[
'startdate'
]))
{
else
if
(
!
$item
[
'startdate'
]
=
str
p
time
(
$item
[
'startdate'
]
,
get_string
(
'strftimedatetimeshort'
)
))
{
$form
->
set_error
(
'accesslist'
,
get_string
(
'unrecogniseddateformat'
,
'view'
));
break
;
}
if
(
!
isset
(
$item
[
'stopdate'
]))
{
if
(
empty
(
$item
[
'stopdate'
]))
{
$item
[
'stopdate'
]
=
null
;
}
else
if
(
!
$item
[
'stopdate'
]
=
str
to
time
(
$item
[
'stopdate'
]))
{
else
if
(
!
$item
[
'stopdate'
]
=
str
p
time
(
$item
[
'stopdate'
]
,
get_string
(
'strftimedatetimeshort'
)
))
{
$form
->
set_error
(
'accesslist'
,
get_string
(
'invaliddate'
,
'view'
));
break
;
}
...
...
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