Commit 25168392 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Setup the default values from ctime and mtime (Bug 1360977)"

parents 975c05d2 4761fa45
......@@ -323,7 +323,9 @@ abstract class ArtefactType implements IArtefactType {
foreach ((array)$data as $field => $value) {
if (property_exists($this, $field)) {
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)) {
$value = preg_split("/\s*,\s*/", trim($value));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment