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
25168392
Commit
25168392
authored
Oct 15, 2015
by
Robert Lyon
Committed by
Gerrit Code Review
Oct 15, 2015
Browse files
Merge "Setup the default values from ctime and mtime (Bug 1360977)"
parents
975c05d2
4761fa45
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/lib.php
View file @
25168392
...
@@ -323,7 +323,9 @@ abstract class ArtefactType implements IArtefactType {
...
@@ -323,7 +323,9 @@ abstract class ArtefactType implements IArtefactType {
foreach
((
array
)
$data
as
$field
=>
$value
)
{
foreach
((
array
)
$data
as
$field
=>
$value
)
{
if
(
property_exists
(
$this
,
$field
))
{
if
(
property_exists
(
$this
,
$field
))
{
if
(
in_array
(
$field
,
array
(
'atime'
,
'ctime'
,
'mtime'
)))
{
if
(
in_array
(
$field
,
array
(
'atime'
,
'ctime'
,
'mtime'
)))
{
$value
=
strtotime
(
$value
);
if
(
!
(
!
empty
(
$value
)
&&
is_string
(
$value
)
&&
$value
=
strtotime
(
$value
)))
{
$value
=
time
();
}
}
}
if
(
$field
==
'tags'
&&
!
is_array
(
$value
))
{
if
(
$field
==
'tags'
&&
!
is_array
(
$value
))
{
$value
=
preg_split
(
"/\s*,\s*/"
,
trim
(
$value
));
$value
=
preg_split
(
"/\s*,\s*/"
,
trim
(
$value
));
...
...
Write
Preview
Markdown
is supported
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