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
b93da288
Commit
b93da288
authored
Feb 08, 2010
by
Evan Goldenberg
Browse files
use empty() for checking if start/stop dates are present
Signed-off-by:
Evan Goldenberg
<
evang@catalyst.net.nz
>
parent
91300f6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/view/access.php
View file @
b93da288
...
...
@@ -346,10 +346,10 @@ function editaccess_submit(Pieform $form, $values) {
if
(
$values
[
'accesslist'
])
{
$dateformat
=
get_string
(
'strftimedatetimeshort'
);
foreach
(
$values
[
'accesslist'
]
as
&
$item
)
{
if
(
$item
[
'startdate'
])
{
if
(
!
empty
(
$item
[
'startdate'
])
)
{
$item
[
'startdate'
]
=
ptimetotime
(
strptime
(
$item
[
'startdate'
],
$dateformat
));
}
if
(
$item
[
'stopdate'
])
{
if
(
!
empty
(
$item
[
'stopdate'
])
)
{
$item
[
'stopdate'
]
=
ptimetotime
(
strptime
(
$item
[
'stopdate'
],
$dateformat
));
}
}
...
...
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