#58449: Date on preview was broken

4.7.x
Steven Wittens 2006-04-12 17:06:57 +00:00
parent 39c261909f
commit 980c54d448
2 changed files with 8 additions and 6 deletions

View File

@ -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).

View File

@ -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).