Commit 980c54d4 authored by Steven Wittens's avatar Steven Wittens
Browse files

#58449: Date on preview was broken

parent 39c26190
......@@ -1750,10 +1750,11 @@ function node_preview($node) {
$node->name = $user->name;
}
// Set the created time when needed:
if (empty($node->created)) {
$node->created = time();
// Set the timestamps when needed:
if ($node->date) {
$node->created = strtotime($node->date);
}
$node->changed = time();
// Extract a teaser, if it hasn't been set (e.g. by a module-provided
// 'teaser' form item).
......
......@@ -1750,10 +1750,11 @@ function node_preview($node) {
$node->name = $user->name;
}
// Set the created time when needed:
if (empty($node->created)) {
$node->created = time();
// Set the timestamps when needed:
if ($node->date) {
$node->created = strtotime($node->date);
}
$node->changed = time();
// Extract a teaser, if it hasn't been set (e.g. by a module-provided
// 'teaser' form item).
......
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