summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2006-04-12 17:06:57 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2006-04-12 17:06:57 +0000
commit980c54d448a4d03326a2a2fa65482fa05dc62ff3 (patch)
tree9cb0b7e8b9938184a92c043528a97a3246cc8f05 /modules
parent39c261909f7ad0b3a22b49607132f86de3228fea (diff)
downloadbrdo-980c54d448a4d03326a2a2fa65482fa05dc62ff3.tar.gz
brdo-980c54d448a4d03326a2a2fa65482fa05dc62ff3.tar.bz2
#58449: Date on preview was broken
Diffstat (limited to 'modules')
-rw-r--r--modules/node.module7
-rw-r--r--modules/node/node.module7
2 files changed, 8 insertions, 6 deletions
diff --git a/modules/node.module b/modules/node.module
index 0e63a81d8..4802f612b 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -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).
diff --git a/modules/node/node.module b/modules/node/node.module
index 0e63a81d8..4802f612b 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -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).