diff --git a/workbench_moderation.module b/workbench_moderation.module index 6c7d5ed..7010ac2 100644 --- a/workbench_moderation.module +++ b/workbench_moderation.module @@ -1651,6 +1651,20 @@ function workbench_moderation_store($node) { // Save the node. node_save($live_revision); + + /** + * The changed of the {node} table should NOT be updated + * until the current revision becomes or replaces the live revision. + */ + $query = db_update('node') + ->condition('nid', $node->nid) + ->fields(array('vid' => $node->workbench_moderation["published"]->vid, + 'changed' => $node->workbench_moderation["published"]->timestamp)) + ->execute(); + $query = db_update('node_revision') + ->condition('vid', $node->workbench_moderation["published"]->vid) + ->fields(array('timestamp' => $node->workbench_moderation["published"]->timestamp)) + ->execute(); } /**