Closed (duplicate)
Project:
Drupal core
Version:
7.0-alpha2
Component:
node.module
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Mar 2010 at 13:51 UTC
Updated:
14 Mar 2010 at 14:53 UTC
In D6, node_save() would always update the node->changed time. In D7, the time is only updated once because node->changed is empty via the code in node_save() at:
// The changed timestamp is always updated for bookkeeping purposes (revisions, searching, ...)
if (empty($node->changed)) {
$node->changed = REQUEST_TIME;
}
Therefore, custom node modules must manually change the updated time in their code like what was done in the D6 node_save() via:
// The changed timestamp is always updated for bookkeeping purposes (revisions, searching, ...)
$node->changed = $time;
I was just wondering if this is by design?
Thanks!
Comments
Comment #1
naheemsays commentedThat was done in #722688: Allow programmatic setting of node->changed I think - and that is still open, so setting this as duplicate.
(but yes, it was a deliberate change.)