Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
c2384e2c
Commit
c2384e2c
authored
Dec 22, 2005
by
Steven Wittens
Browse files
-
#41973
: Ensure -\>changed and -\>created are equal on node creation
parent
69bcdef5
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/node.module
View file @
c2384e2c
...
...
@@ -425,8 +425,11 @@ function node_save(&$node) {
}
}
// If node has never changed, set $node->changed to $node->created
// If we set $node->created to time(), then 'changed' and 'created' will be
// different for new nodes which were previewed before submission
// The changed timestamp is always updated for bookkeeping purposes (revisions, searching, ...)
$node
->
changed
=
time
()
;
$node
->
changed
=
$node
->
changed
?
time
()
:
$node
->
created
;
// Split off revisions data to another structure
$revisions_table_values
=
array
(
'nid'
=>
$node
->
nid
,
'vid'
=>
$node
->
vid
,
...
...
modules/node/node.module
View file @
c2384e2c
...
...
@@ -425,8 +425,11 @@ function node_save(&$node) {
}
}
// If node has never changed, set $node->changed to $node->created
// If we set $node->created to time(), then 'changed' and 'created' will be
// different for new nodes which were previewed before submission
// The changed timestamp is always updated for bookkeeping purposes (revisions, searching, ...)
$node
->
changed
=
time
()
;
$node
->
changed
=
$node
->
changed
?
time
()
:
$node
->
created
;
// Split off revisions data to another structure
$revisions_table_values
=
array
(
'nid'
=>
$node
->
nid
,
'vid'
=>
$node
->
vid
,
...
...
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